RE: [PHP] Directing to a URL from a radio group

From: Date: Sun, 29 Dec 2002 03:11:47 +0000
Subject: RE: [PHP] Directing to a URL from a radio group
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-129563@lists.php.net to get a copy of this message
> Somehow, I cannot find the right code here. > > I have a radio group with options as follows: > value1 = orgname > value2=orgcity > value3=orgsize > value4=orghead > > When the user chooses "orgname" he must be redirected to the page > ../orgname.php > When the user chooses "orgcity" he must be redirected to the page > ../orgcity.php > ...and so on. Say your radio group was named "choice" then you could do something like this: Header("Location: http://yourdomain.com/{$_POST['choice']}.php"); Throw in some validation to $_POST['choice'] (or $_GET['choice']) to make sure you are directing to the directory you should be directing to. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/

« previous php.general (#129563) next »