Teo, You may want something like this: switch( $Color ) { case "Yellow": header("Location: yellow.php"); break; case "Green": header("Location: green.php"); break; default: echo"No switch value present for Color - contact the webmaster."; exit; } // end switch( $Color )
Depending on usage, you may also get away with a simple: include_once("yellow.php"); // instead of using header() Regards, Richard http://phpyellow.com ______________________ Teo wrote: Hi All! I would like to redirect the user to another php page accordingly to his/her chosen options, example: if ($Color == "Yellow") { go to page .... else if ($Color == "Green") go to page .... } Does anyone knows how to achieve the goal?? Thanks Teo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php