Re: two submit buttons redirecting to two scripts

From: Date: Mon, 14 Oct 2002 21:49:00 +0000
Subject: Re: two submit buttons redirecting to two scripts
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-119957@lists.php.net to get a copy of this message
you have this: <input type="submit" value="b1" name="action" /> <input type="submit" value="b2" name="action" /> change the name of the buttons to b1 and b2, respectively, and give them some non-null value (as you have it) Then in action.php you will have the following code: if ($b1) { redirct to script1 } elseif ($b2) { redirct to script2 } /*Either b1 OR b2 will have a value, not both, and use header() to redirect the sctipt*/ "Sonal Patel" <sonal@antriksh.com> wrote in message news:8DFF5F2C-DFBC-11D6-BC1B-0030655649F6@antriksh.com... > Hello, > > I am very new to this group. > > I have a very simple question. > Please look at this form, > http://antriksh.com/resources/2_submit_button_form.shtml > > here I want to change the echo statement in the script "action.php" to > redirect it to another script. > > ie, I want to change the form action dynamically. How can I modify > this form to do so? > > I tried few PHP tricks that did not work for me. So I am asking this > questions to anyone who may be able to help. > > Thank you , > Sonal >

« previous php.general (#119957) next »