Re: Session Variables

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

 



Only use $_SESSION if you're running PHP 4.1.0 or higher as in previous versions it's not available as a global variable. Check this link on PHP for more info on session:

http://ca3.php.net/manual/en/ref.session.php

Cheers.

Armando

graeme wrote:
Also use $_SESSION rather than HTTP_SESSION_VAR.

Mike wrote:

You need to make sure that in your second page that you're starting the
session - if you don't do this then that second page will never have access
to those session variables.


-M


-----Original Message-----
From: Richard Duval [mailto:rick@xxxxxxxxx] Sent: Monday, March 07, 2005 7:05 PM
To: php-windows@xxxxxxxxxxxxx
Subject: Session Variables


Newbie question, sorry but I've searched everywhere and can't seem to find the answer...

Session variables...should be able to define in one page, call the next page and have it available there as well right?

I can print out the session varialble in the page it was created, no problem Then I call the next page, try to echo the variable and I get:

Notice: Undefined variable: HTTP_SESSION_VARS in C:\vhome\nl4x4\admin\sendmail\prep_mail.php on line 17

Is there something else I have to do to get these variables carried to the next page?

The code I'm using is simply: <p><?php echo $HTTP_SESSION_VARS['count_ind_members']; ?></p>

Thanks


"Imagination is more important than Knowledge" --Albert Einstein--







-- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux