RE: PHP No Session

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rich,

Yes, PHP Sessions are maintained through ahref links, however if you are header redirecting to another page on your site, you must specify the sessionid in the get string (the superglobal $_GET).  Example:

Header("Location: http://www.mysite.com/file/something.php?SESSIONID=".session_id());

Note: The php function session_id() will return the current sessionid.

However when simply linking to part of your site, you don't need to specify the session, it will carry over automatically, example:

echo "<a href=\"http://www.mysite.com/file/something.php\"";;

Hope that helps,

-Andrew Bartel
Modulus, LLC

____________________________________________________
Andrew Bartel, Web Applications Engineer
Modulus, LLC
1720 Willow Creek Circle, Suite 520
Eugene, OR 97402
andy@modulusgroup.com
Voice +1 541 434-1024
Fax   +1 541 434-1191
http://www.modulusgroup.com


-----Original Message-----
From: Rich Gray [mailto:richard.gray@easychange.com]
Sent: Monday, July 19, 2004 7:10 AM
To: php-objects@yahoogroups.com
Subject: RE:  PHP No Session


> Friends,
>
> Does a PHP page still holds the session information that was set
> in the previous page but not in the current page.
>
> Will Page 2 pass the pass the sessions of page 1 to page 3 if
> page 1 sets php sessions, page 2 is not doing so, but is
> referred by page 1, and page 3 is trying to retrive the sessions
> of page 1, that was reffered by page 2?
>
> [page 1]: sets sessions
>   Links page 2.
>
> [page 2]: idle
>   Links page 3
>
> [page 3]: retrives session.
>
> Please tell me how is this maintained.

use session_start() at the beginning of all your scripts that need to
manipulate session data - this will reload the superglobal $_SESSION array
with previously populated data.

hth
rich





PHP Data object relational mapping generator - http://www.meta-language.net/ 
Yahoo! Groups Links



 




------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/saFolB/TM
--------------------------------------------------------------------~-> 

PHP Data object relational mapping generator - http://www.meta-language.net/ 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-objects/

<*> To unsubscribe from this group, send an email to:
    php-objects-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux