I'm not sure if this is related (possibly), but I has similar problems with

I doiscovered that the cookie was only being set if the page that set it
actually produced HTML. By redirecting, you cut out the HTML-writing.

Why not redirect the user if the test fails instead.



> -----Original Message-----
> From: Lars Rasmussen [mailto:[EMAIL PROTECTED]
> Sent: 12 March 2003 3:40 pm
> Subject: [PHP-DB] session and header("location....")
> Hi everyone,
> Thanks for looking at my question!
> Well, i just made a script that firstly check's up username and password
> (log-in script) then next if the user enteret the correct information a
> session is set like this:
>           session_id($sessid);
>           session_start();
>           $_SESSION['ngskdsngjkla465gfdh'] = "LOGETIN-TRUE";
> But then when this session is set it changes from the log in page to the
> real password-protected page.
> I tried with a normal header location, but it did'nt work, so i tried to
> look at about sessions, it says that you're had to transfer the
> sessionid to the next page. Now i'm trying that, but it just wount
> work...
> The header location im using looks like this:
>       header("Location:
> http://www.domain.tld/admin/index.php?PHPSESSID=".sessid);
> And i also tried with:
>       header("Location:
> http://www.domain.tld/admin/index.php?PHPSESSID=".$sessid);
> But none of them will work....i hope you will look at it, and tell me if
> you have a solution.
> Thanks folks.
> Regards.
> Lars Rasmussen
> --
> PHP Database Mailing List (
> To unsubscribe, visit:

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to