Re: Form Actions in PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
BAY2-DAV51xf4yp8ARf0000bf34@hotmail.com">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



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux