I don't know of any rule that says you cannot have two submit button in the same form.
Of course, if you need to know which was clicked, you will either need to name them differently or detect their values in your form processing routine. If the button is clicked that should take you to another form simply do a redirect (after processing all $_POST information); header("Location: new page"); exit; // I always use this because processing continues after header good luck, Warren Vail -----Original Message----- From: Golawala, Moiz M (IndSys, GE Interlogix) [mailto:[EMAIL PROTECTED] Sent: Monday, September 15, 2003 1:17 PM To: [EMAIL PROTECTED] Subject: [PHP] multiple FORMS on same page problem. I am creating a page with 2 buttons. One which will refresh the page and the other that will go to another page. My problem that I need to put all the values into $_POST and have access to when any of the 2 buttons are clicked. If I use the button in 2 seperate form tags I don't have access to all the values in $_POST. Please look at the code below: file (page4.php): <html> <form action="page4.php" method=post> <?php echo "this is page 4"; ?> <input type=text name='someVal' value=''"> <input type='submit' value='page4 Submit'> </form> <form action="page5.php" method=post> <input type='submit' value='page5 Submit'> </form> </html> file(page5.php): <?php $val = $_POST['someVal']; echo $val; echo "this is page 5"; ?> I would like to see the variable 'someVal' in the $_POST of both "page4 Submit" button and "page5 Submit" button. This code is a simplified version of the more complecated code where a tonnes of other values are involved. Any help is appreciated. Moiz -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php