Click to See Complete Forum and Search --> : header redirection in php


takinduro
04-13-2007, 08:00 AM
Hello,

I have a question about the header redirection code in php. I am using it for my login page, and once a user is logged in, I am redirecting them to a particular page based on their id. My question is it appears that they are being logged in, but I don't know if they are being redirected or..what. Once they click login, it logs them in, but my url still show login.php. I wanted to know what I may be doing wrong. Here is my code.

if ($rsUpdate)
{
if($testusertype == '1')
{
header("Location: investor.php"); // redirects members to a welcome member page
}
else
{
header("Location: member.php");
}
}

Thanks

Crucial
04-13-2007, 08:12 AM
Greetings,
The location header requires a full uri value.

Try
header("Location: http://yourdomain.com/member.php");

http://us2.php.net/manual/en/function.header.php
HTTP/1.1 requires an absolute URI as argument to » Location: including the scheme, hostname and absolute path