powaz Posted May 17, 2007 Share Posted May 17, 2007 this is the code of 2 forms: echo '<form name="form1" action="form1.php" method="post">'; echo '<input type="submit" name="submit" value="Form1">'; echo '<form name="form2" action="form1.php" method="post">'; echo '<input type="submit" name="submit" value="Forma2">'; echo '</form name="form2"></form name="form1">'; then i submiting form1 it going to form1.php, but if i submiting form2 it go to same form1.php how to solve this problem what each form must go to its action? All ideas are welcomed Have a nice day. Link to comment https://forums.phpfreaks.com/topic/51780-quest-about-form/ Share on other sites More sharing options...
squiggerz Posted May 17, 2007 Share Posted May 17, 2007 echo '<form name="form1" action="form1.php" method="post">'; echo '<input type="submit" name="submit" value="Form1">'; echo '<form name="form2" action="form1.php" method="post">'; echo '<input type="submit" name="submit" value="Forma2">'; echo '</form name="form2"></form name="form1">'; You have your form2 action set to "form1.php rather than "form2.php should look like this: echo '<form name="form1" action="form1.php" method="post">'; echo '<input type="submit" name="submit" value="Form1">'; echo '<form name="form2" action="form2.php" method="post">'; echo '<input type="submit" name="submit" value="Forma2">'; echo '</form name="form2"></form name="form1">'; might want to close that 1st form before you start the second one as well Link to comment https://forums.phpfreaks.com/topic/51780-quest-about-form/#findComment-255103 Share on other sites More sharing options...
powaz Posted May 17, 2007 Author Share Posted May 17, 2007 hmm... yes but problem not in this... then i press submit1 or submit2 only one form is active the first one... i need the both form active Link to comment https://forums.phpfreaks.com/topic/51780-quest-about-form/#findComment-255107 Share on other sites More sharing options...
vbnullchar Posted May 17, 2007 Share Posted May 17, 2007 this might help you, check thi out! http://www.webdeveloper.com/forum/showthread.php?t=88939 Link to comment https://forums.phpfreaks.com/topic/51780-quest-about-form/#findComment-255248 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.