I've changed what I originally answered with, assuming option 1 has the
value 12 (as you describe) and option 2 has value 14...

<?

if $option_button == "1") {
header("Location: some_page_or_other.php?12");
} else {
header("Location: some_other_page_you_choose.php?14");
}
?>

then you can get that value with this...

(top of some_page_or_other.php)

        $user_selected_value = getenv("QUERY_STRING");

(top of some_other_page_you_choose.php)


        $user_selected_value = getenv("QUERY_STRING");



Cheers


Dave




-----Original Message-----
From: CrossWalkCentral.Net (Webmaster)
[mailto:[EMAIL PROTECTED]]
Sent: 03 August 2001 02:38
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] PHP redirect?


I got it to work Thanks to Dave Watkinson however I do have another
question.

If I redirect to another page will I be able to pass the variable from
the
form to it as well?

here i my layout.

>From passes 6 variables to my php redirect if they sletect option 2 the
the
value is 12 redirecting to annother php file where i will need that
value of
12.



"Dave Watkinson" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
<?

if $option_button == "1") {
header("Location: some_page_or_other.php");
} else {
header("Location: some_other_page_you_choose.php");
}
?>

that's all you need - make sure the form on the previous page has two
radiobuttons, each with the same name of option_button and each has a
value - one is 1 and the other is 2.


HTH :-)



Dave






-----Original Message-----
From: Webmaster [mailto:[EMAIL PROTECTED]]
Sent: 02 August 2001 04:45
To: [EMAIL PROTECTED]
Subject: [PHP-DB] PHP redirect?


I have a form and based off of this form if my user selects option a
then I
want them to be redirected to another page. If they select option B then
I
want to continue with my php scrips as it does now.

Does any one have any ideas on how I can accomplish this?





--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to