You are here: Re: Passing session variables across pages « PHP Programming Language « IT news, forums, messages
Re: Passing session variables across pages

Posted by Michael Fesser on 05/05/07 08:18

..oO(K. A.)

>==>>> The resulting page http://vector/test/testvariables.php looks
>like:
>session started
>UserName: ( )
>Password: ( )
>
>Session variables have not been passed across!
>PS. I'm using PHP version 4.3.10, with Apache 1.3.12 (I think!)
>
>In the error log, it says:
>Undefined index: userid in testvariables.php on line 5
>Undefined index: password in testvariables.php on line 6
>
>I'm quite new to PHP, please help!

How's the session ID stored on the client, in a cookie or appended to
the URLs? If it's not stored in a cookie, it will get lost in step 2
when the script redirects.

You could try this:

if (...) {
header('Location: http://example.com/test/testvariables.php?'.SID);
exit;
} else {
...
}

Micha

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация