Posted by Petr Vileta on 08/15/06 12:41
<crescent_au@yahoo.com> píse v diskusním príspevku
news:1155622217.002064.121000@75g2000cwc.googlegroups.com...
> Hi all,
>
> Please help me out here.
>
> Am I missing something?
>
Yes ;-) You must start session on each page where you want set or get
session infos and close it.
on Page A:
<?php
session_start(); // THIS IS IMPORTANT
<a href="<?php echo 'pageB.php?item=docs&sSID='.session_id();
session_write_close(); // THIS IS IMPORTANT TOO
?>">Docs</a>
on PageB:
<?php
session_start(); // THIS IS IMPORTANT
if ($sSID) {
echo $_SESSION['username']; // THIS IS WHAT I WANT TO READ HERE
....
session_write_close(); // THIS IS IMPORTANT TOO
?>
--
Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail
from another non-spammer site please.)
Navigation:
[Reply to this message]
|