G'day Martin, I'm new to PHP too, and I'm working on the same sort of problem...
I had some success with something like this... //----------------------------------------------------- <? //location index stored in variable $n //print("<br>Location chosen = Location $n"); //debugging switch($n){ case 0: $location = "http://www.xyz.com/"; break; case 1: $location = "http://www.zzz.com/manual/mod/"; break; case 2: $location = "http://abcd.com/manual/mod/mod_php4/"; break; case 3: $location = "http://something.com/Linux_Root/index.html"; break; case 4: $location = "http://www.hhh.com/manual/mod/mod_php4/"; break; } //$url = urlencode($location); //debugging //print("<br>Location chosen = $url"); //debugging header ("Location: $location"); /* Redirect browser to another web site */ exit; /* Make sure that code below does // not get executed when redirecting*/ ?> //------------------------------------------------------ hope this helps best regards Graeme On Fri, 1 Feb 2002 08:44, you wrote: > use: { header("location: new_full_url_here"); exit; } > > -----Original Message----- > From: Benjamin deRuyter [mailto:[EMAIL PROTECTED]] > Sent: Friday, February 01, 2002 9:42 AM > To: PHP > Subject: [PHP] redirection rather than include() > > > This is a PHP newbie trying to figure something out. > > I am creating a web-app which begins with a login page and goes through the > typical user/pass validation and upon success moves to a frameset where the > application will run. The action of the login form is act_login.php. In > that script I validate the user/pass and, upon validation, include() the > frameset script. However, I would rather redirect the browser to the > frameset script. In other words I want to progression to go like this... > > login form --> successful login (determined by act_login.php) --> redirect > browser to app frameset > > This scenario is probably swimming in technicalities, and I'm probably just > fine using the include() statement. However, I guess my overall question > is... is there a way to redirect the browser to a new URL (eg. php script) > inside something as simple as an if/then statement? > > Thanks! -- PHP General 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]