No, s/he has a statement such as:
Code:
print '<input';
print ' type="button" class="px10"';
print ' onclick="this.form.action='writeform.php';'
print ' this.form.submit();"';
print ' value="Import"';
print '>';
... which isn't working because of the single quotes around 'writeform.php.' It would be better written as:
Code:
?>
<input
type="button" class="px10"
onclick="this.form.action='writeform.php'; this.form.submit();"
value="Import"
>
<?php
It would be even better if you didn't use the Javascript at all: try a type="submit" input element:
Code:
<input
type="submit"
class="px10"
name="action"
value="Import"
>
... then check if($_REQUEST['action'] === 'Import') in the page to which it submits, perhaps calling writeform.php if necessary. That class="px10" also look as if you might have something like:
Code:
.px10 {
width: 10px;
}
If that's so, don't a) use pixels to size elements containing text or b) use class names that describe their style. Class names should be semantic and refer to the elements that they style, e.g. "submit-button".
Bookmarks