If you have session cookies disabled in your browser then you have to add
the session ID to the redirect. If you have your cookies enabled and you are
still losing the session then there must be some other problem.

no cookie compatible:

header("Location: http://someplace.com/somepage.php?PHPSESSID="; .
session_id() );
exit();

if you have session.use_trans_sid = 1 or you compiled
with --enable-trans-sid the session id will be automatically added to
relative get or post. Both links that are not a relative URI and header
redirects require that you manually append the session id to the query
string to keep the session without the need for a session cookie.

Jim Grill
Support
Web-1 Hosting
http://www.web-1hosting.net
----- Original Message -----
From: "k a m e s h" <[EMAIL PROTECTED]>
To: "Tech Support" <[EMAIL PROTECTED]>
Cc: "Matt" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, July 26, 2002 1:21 PM
Subject: Re: [PHP] Help: header function


>
> thanks for the help..
>
> There was no problem with the syntax.. I used the correct syntax in my
> code: the quotes and both the host name and the script name.. i didnt
mention
> it properly in the mail..
> i have also tried it with absolute URL.. as you have mentioned the problem
> is: session information is not transmitted in redirection.. is there any
> way of resolving this problem?
> i wrote a single script that will allow a user to update the db, if he is
> logged in or it will display the login form if he is not logged .. once he
> logs in successfully, i call the script again so that he will be able
> to update the db.. pls help me..
>
> regards
> kamesh
>
>
>                                                       _____________
>                                                       s kameshwaran
>                          eEL, Dept of CSA, IISc, Bangalore - 560012
>                    Homepage: http://www2.csa.iisc.ernet.in/~kameshn
>      Phone: +91-80-3942368-111 (Lab), +91-80-3942624 (Hostel: U-95)
>      ____________________________________
>      Eternity abides in the present.. NOW
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to