Re: Form Actions in PHP

From: Date: Wed, 16 Jul 2003 16:18:51 +0000
Subject: Re: Form Actions in PHP
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-29281@lists.php.net to get a copy of this message
Have a PHP script that intervenes, ie. // HTML File <form action="decide.php" method="post"> <input type="radio" name="variable" value="0"><br> <input type="radio" name="variable" value="1"> </form> // decide.php <?php if($_POST[variable] == "0") { header("Location: location_one.cgi?variable=0"); } elseif($_POST[variable] == "1") { header("Location: location_one.cgi?variable=1"); } ?> "Rick Dahl" <dmbserver@hotmail.com> wrote in message news:BAY2-DAV51xf4yp8ARf0000bf34@hotmail.com... I have a small problem. I need to have a form post to two different locations. If a variable is a certain value, it goes to location_one.cgi and if it is another value, it goes to location_two.cgi. This may turn out be a html problem but I figured php was the way to go since it is more dynamic. Any help is appreciated. - Rick

« previous php.db (#29281) next »