You are here: Re: Sessions « PHP Language « IT news, forums, messages
Re: Sessions

Posted by Stefan Rybacki on 07/19/05 21:34

roN wrote:
>
> Okay lets' say I'd do this:
> [ExCode.php]
> session_start();
> $session= session_id();
> echo "<a hrerf=\"test.php?SID=$session\">testlink</a>";
> [/ExCode.php]
>
> what would I have to do in test.php to continue workng with all the
> Variables i set in ExCode.php?
> Sessions do forward all defined variables don't they?
> Thank you!

No they don't. They only store the variables you store explicit by calling
$_SESSION['variable']=$variable;

test.php

session_start();
$variable=$_SESSION['variable'];
....

//use of variable

By the way ALWAYS use session_name() instead of the real session's name (SID).

Regards
Stefan


>
>>Regards
>>Stefan
>>
>>
>>
>>>Thank you!
>>>
>>>--
>>>chEErs roN
>>>I'm root. I'm allowed to do this! ;)
>>>keep on rockin'
>
>

 

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

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