Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sessions/Cookies very confused

Status
Not open for further replies.

salewit

Programmer
Oct 31, 2002
58
US
Ok, I'm pretty new to PHP and took on the ambitious assignment of writing a shopping cart program with MySQL. I'm using session variables to identify a user from page to page. Everything works wonderfully. Except for the big boss 3000 miles away who tried it and couldn't log in.

So suspect cookies and sessions are somehow intertwined, and change the privacy setting in my EI browser to "Block all cookies" and sure enough I can't log in either. What does cookies have to do with sessions? If I can't use cookies or sessions with 100% of the people using this thing, what are my alternatives? And also, I thought if a browser's cookies were set to block, the variables would automatically get sent through the URL.

Can anyone help me out with this?
 
A set of session variables consists of two parts: a session store, by default, on the server's filesystem and a session index cookie that is stored on the browser.

PHP generates a unique ID. That unique ID is part of the filename for a user's session store. And the cookie provides PHP with the necessary information to match a user to his own session store on subsequent script runs.



Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top