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

Posted by K. A. on 05/05/07 09:21

On May 5, 12:18 pm, Michael Fesser <neti...@gmx.de> wrote:
> .oO(K. A.)
>
> >==>>> The resulting pagehttp://vector/test/testvariables.phplooks
> >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

Thanks Micha,
I tried appending but did not work with me, could you please elaborate
more,
How do I use the cookie method? (sorry, I am new to this!).

KA

 

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

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