Re: PHP redirect?

From: Date: Fri, 03 Aug 2001 01:43:45 +0000
Subject: Re: PHP redirect?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-11016@lists.php.net to get a copy of this message
Again Thanks Dave! "Dave Watkinson" <d.watkinson@mightymatch.com> wrote in message news:7CB9A13377EBE542BA2C8146178E8C7B02A398@bigbertha.mmhome.co.uk... 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:webmaster@crosswalkcentral.net] Sent: 03 August 2001 02:38 To: php-db@lists.php.net 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" <d.watkinson@mightymatch.com> wrote in message news:7CB9A13377EBE542BA2C8146178E8C7B02A391@bigbertha.mmhome.co.uk... <? 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:webmaster@crosswalkcentral.net] Sent: 02 August 2001 04:45 To: php-db@lists.php.net 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: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#11016) next »