I have 2 forms in one page but action is the same for both forms Suppose I have a page xyz.php and xyz_action.php is action page to perform something like this. <Form action =xyz_action.php> <!-- some input à </form>
<Form action =xyz_action.php> <!-- some input à </form>
How can I do this?? I am using one if condition to check from which submit buttons data came in. But it is nor working.
Add a hidden form value to both forms as follows:
<input type=hidden name=form value=form1>
Then in the 2nd form have:
<input type=hidden name=form value=form2>
On your action page check the value of $_POST["form"] and see which it matches too.