Posted by roN on 07/18/05 20:26
Stefan Rybacki wrote:
> roN @ work wrote:
>> Hi,
>>
>> I start a session (session_start();) and then I display a form where
>> users can enter their access-data.
>> If the data are okay I'm gonna display a link where I use a pointer
>> defined in the first file as well. I tried to pass the pointer like:
>> $_SESSION['mbox']= $mbox; but in the secondfile where I placed a
>> session_start(); at the start as well I get "Notice: Undefined
>> index: mbox in /srv/www/htdocs/web2/html/php/nospam/pop.php on line 166"
>> after
>> the line: $mbox = $_SESSION['mbox'];
>> why?
>> Do I got to pass the SID to the 2nd file as well? How? And how to
>> use it in the 2nd file?
> Yes. With cookies or by adding session_name().'='.session_id() as GET
> parameter to a link or if you POST data by inserting a hidden field
> with the name of the session and the id. You use it just with calling
> session_start(); at the beginning.
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!
>
> Regards
> Stefan
>
>
>> Thank you!
>>
>> --
>> chEErs roN
>> I'm root. I'm allowed to do this! ;)
>> keep on rockin'
--
chEErs roN
kEEp on rockin'
Navigation:
[Reply to this message]
|