RE: [PHP] php sessions...
| From: | Bruce Douglas | Date: | Fri, 16 May 2003 16:32:54 +0000 |
| Subject: | RE: [PHP] php sessions... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-147917@lists.php.net to get a copy of this message | ||
sorry..left this out!
in other words.... why does it appear that i need to set the SESSION var to
another var in order to use it.....
thanks...
but here's my issue...
i have session_start() at the top of the page. however when the page is
displayed on the 1st time, i'm unable to use $_SESSION['foo'] as a direct
var...
$eee = $_SESSION['myAuctionID'];
echo "
blah..... $_SESSION['myAuctionID'] gg<br> <--- this doesn't seem to work
blah44..... $eee gg<br> <--- this seems to work
blah66..... $myAuctionID gg<br> <--- this doesn't seem to work
";
my question is why do i not seem to be able to use the session var later in
the page, the 1st time the page is displayed...
thanks...
bruce
bedouglas@earthlink.net
-----Original Message-----
From: Dan Joseph [mailto:djoseph@duhq.us]
Sent: Friday, May 16, 2003 8:57 AM
To: Bruce Douglas; 'PHP Lists'
Subject: RE: [PHP] php sessions...
Hi,
You just need to put session_start(); at the top of the pages you want to
use the sessions with.
-Dan Joseph
> -----Original Message-----
> From: Bruce Douglas [mailto:bedouglas@earthlink.net]
> Sent: Friday, May 16, 2003 11:56 AM
> To: 'PHP Lists'
> Subject: [PHP] php sessions...
>
>
> hey a quick question/clarification...
>
> i have the following...
>
> <?php
> session_start();
> $_SESSION['foo'];
>
> $_SESSION['foo'] = "ffoo";
>
> ?>
>
> later in the code i want to use the session var... my question... how/what
> do i need to use the $foo var. I was under the impression that $foo was
> automatically available when declaring the session var... do i need to use
> session_register('foo')? if i do, why... wouldn't the "foo" session
> var
> already be registered with $_SESSION['foo']
>
> i have php 4.3.1
>
> arrggghhh..!!!!
>
> thanks
>
> bruce
> bedouglas@earthlink.net
>
> ps. i've done a google search ..but not quite sure as to how it really
> works/what's really going on...
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>