Re: 1 Form, 2 Submit-Buttons

From: Date: Fri, 12 Jul 2002 07:12:26 +0000
Subject: Re: 1 Form, 2 Submit-Buttons
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-107329@lists.php.net to get a copy of this message
Johan Holst Nielsen wrote:
Hello! I want to make a form (a wizard) which has 2 Submit-Buttons (Back & Next). The buttons should be images. How can I make php see, which button has been pressed?
<?php if(isset($_POST["submit_back"])) {
    //go back
} else {
    //go forward
} ?> <form action="<?=$_SERVER["PHP_SELF"]?>" method="post"> <input type="submit" name="submit_back" value="Back"> <input type="submit" name="submit_next" value="Next"> </form>
Oooh sorry... offcouse <input type="image" src="image.png" name="submit_back...

« previous php.general (#107329) next »