The "action" parameter of a <FORM...> tag is the filename of the script that you want to send the form's data to. It bears no relationship to a click event. In your case, you would not use any PHP tags (and definitely
never a bare
<?). Your example didn't show any Form Inputs, so it would be pointless to use a Form at all. (Maybe you just omitted the rest of the Form, in which case disregard that comment.)
Now, click events are something altogether different. If you have
no Form data that you need to send, just use the onClick event of an <INPUT Type='button' .../> without any Form. You would need to use Javascript to redirect to a new page, not just the name of a file.
If you do need to send data from a Form, it would look like this:
Code: Select all
<form method='post' action='somescript.php'>
Color: <input type='text' name='color' /> <br />
Quantity: <input type='text' name='qty' /> <br />
<input type='submit' value='Go' /> </form>