Jump to content

submit/cancel form


Kano

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/41952-submitcancel-form/
Share on other sites

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'">

Link to comment
https://forums.phpfreaks.com/topic/41952-submitcancel-form/#findComment-203387
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.