Forum Moderators: coopster

Message Too Old, No Replies

Session Variables

         

TheSeoGuy

4:41 pm on Jul 13, 2004 (gmt 0)

10+ Year Member



I am attempting to create a shopping cart system that will allow both people with accounts and people without accounts to purchase items.

For the people who have accounts, I can set a session variable easily enough when they log in, but how do I keep track of the "non account" holders sessions?

Does PHP have any type of generic session variable that gets written for each user that I could check?

Thanks in advance.

RonPK

4:52 pm on Jul 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There is no need for a login to work with sessions. Just start the session on each page, with

session_start();

and store posted stuff in the sessions like this

$_SESSION['number_of_widgets'] = $_POST['number_of_widgets'];

Well, I guess you already had that running.

TheSeoGuy

5:03 pm on Jul 13, 2004 (gmt 0)

10+ Year Member



Ah, yes! You are absolutely correct.

I guess I was reading too much into what I was trying to do!

Thank you.