RE: [PHP] Multiple Page Form

From: Date: Tue, 23 Jan 2001 20:52:38 +0000
Subject: RE: [PHP] Multiple Page Form
Groups: php.general 
Request: Send a blank email to php-general+get-36260@lists.php.net to get a copy of this message
Make sure you are not forgetting to include $action as a hidden input, so your script can know how to process. <input type=hidden name=action value=Send>, for example -Ben -----Original Message----- From: Jeremy Bowen [mailto:ocarules@webnationinc.com] Sent: Tuesday, January 23, 2001 12:17 PM To: php-general@lists.php.net Subject: [PHP] Multiple Page Form hey, I am sure this is a dumb question but, I cannot seem to find out what i am doing wrong. I have a three page form, it basically takes a users input, displays it on the next page to make sure the users info is correct (i store the variables on this page in a form in hidden input tags), when the user clicks subscribe on this page it is supposed to go on to the third page which is a confirmation page. We instead of doing that it just reloads the page and resets all of the values! My form looks something like this (This is a simplified version): <? if ($action=="") { PAGE ONE TEXT AND FORM <form method=post action=$PHP_SELF> <input type=text name=name> <input type=text name=email> <input type=submit value=Subscribe> </form> } elseif ($action="Send") { PAGE TWO <form method=post action=$PHP_SELF> $name <input type=hidden name=name> $email <input type=hidden name=email> <input type=submit value=Subscribe> <form> } elseif ($action="Send") { Thanks for Subscribing! mail("Args","Args","Args"); } ?> I have looked on php.net but i cannot seem to find docs on how to do this! Thanks, Jeremy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#36260) next »