View Full Version : Posting a Form

May 12th, 2005, 07:19 PM
Hey there,
I got two buttons:

<input type="Submit" name="Submit" value="Edit Page"> -
<input type="Submit" name="Preview" value="Preview Page">
As you see, they are both Submits. When they click 'Submit' I want it to go to url1 (index.php). If they click 'Preview', I want it to go to url2 (index2.php) both posting the data upon click. How could I do this?


May 13th, 2005, 04:22 AM
<input type="Submit" name="Submit" value="Edit Page" onclick="this.form.action='index.php'" /> -
<input type="Submit" name="Preview" value="Preview Page" onclick="this.form.action='index2.php'" />