Kano Posted March 9, 2007 Share Posted March 9, 2007 HI there, Can someone help me please, I have a form with two buttons - cancel and submit, <form action = "order.php?process=yes" method = "post"> <input type = "submit" name="submit" value="cancel"> <input type = "submit" name="submit" value="submit"> How does one get the script to reset on cancel or process order on submit? thanks. Quote Link to comment https://forums.phpfreaks.com/topic/41952-submitcancel-form/ Share on other sites More sharing options...
gazalec Posted March 9, 2007 Share Posted March 9, 2007 in your <input type=> instead of "Submit" put "Reset" that should work Quote Link to comment https://forums.phpfreaks.com/topic/41952-submitcancel-form/#findComment-203383 Share on other sites More sharing options...
JasonLewis Posted March 9, 2007 Share Posted March 9, 2007 what gazalec will clear all the data in the form. if you want to go to a different page when you click cancel then you can make your cancel button look like this: <input type="button" name="cancel" value="cancel" onclick="javascript: window.location='order.php?process=no'"> Quote Link to comment https://forums.phpfreaks.com/topic/41952-submitcancel-form/#findComment-203387 Share on other sites More sharing options...
Kano Posted March 9, 2007 Author Share Posted March 9, 2007 sweat, thanks guys. Quote Link to comment https://forums.phpfreaks.com/topic/41952-submitcancel-form/#findComment-203402 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.