Re: Sessions Help
| From: | Greg Donald | Date: | Sun, 03 Mar 2002 18:32:27 +0000 |
| Subject: | Re: Sessions Help | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-86992@lists.php.net to get a copy of this message | ||
On Sun, 3 Mar 2002, Ramesh Nagendra Pillai wrote:
>I am very new to PHP develope Can any one please help
>me to use session variables.
>I am able to register an variable.
>My probelm is how to get the values of that registered
>variable in the successive pages?
You probably need to pass the session_name() and session_id() in the url,
or if you're submitting a form you can send them ahead as hidden
variables:
Make your links like this:
<a href="page.php?<?=session_name()?>=<?=session_id()?>">click
here</a>
Or your hidden form fields like this:
<input type="hidden" name="<?=session_name()?>"
value="<?session_id()?>">
Also, there is a specific compile time option that can influence if
this is automatic or not, --enable-trans-sid, have a look at:
http://www.php.net/manual/en/ref.session.php
http://www.php.net/manual/en/install.configure.php
--
-----------------------------------------------------------------------
Greg Donald - http://destiney.com/
http://phprated.com/ | http://phplinks.org/ | http://phptopsites.com/
-----------------------------------------------------------------------