i have 2 submit buttons in a form with values submit and cancel.when i click cancel button it goes to the submit page...it wont take it's own url...when i tried with button type then no action happened...what to do...plz help me...
two submit buttons
Collapse
X
-
Tags: None
-
Keep the code for both Submit and Cancel in the same page with and make the algorithm work like this...Originally posted by selvialagari have 2 submit buttons in a form with values submit and cancel.when i click cancel button it goes to the submit page...it wont take it's own url...when i tried with button type then no action happened...what to do...plz help me...
[php]<?php
if (isset($_POST['Submit']))
{
//add the code for submit
}
elseif (isset($_POST['Cancel']))
{
//add the code for cancel
}
else
{
die('Invalid Request');
}[/php] -
Comment