Session variables performing oddly

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Ryaareet
Forum Newbie
Posts: 1
Joined: Thu Oct 02, 2003 7:33 pm

Session variables performing oddly

Post by Ryaareet »

I run a website that required users to log in and the login details are stored using session variables to allow me to auto update the scores in a database.
For some users this works for only 20% visitors.

the rest cannot log in once they have registered their username.

I have read an article that states that almost 97% of users have cookies ENABLED so I discounted that theory.


Any other theories out there?
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post by JAM »

sessions and cookies are not the same tho.
I hope I'm correct when I state that the most common browsers (IE and netscape) doesn't support blocking of sessions. Mozilla does however, so there a problem might occur.

If you ARE using cookies, make sure that you have the domain part of the setcookie() correct, as this is a common thing people writes badly.

However, if you still experience issues with $_COOKIE/$_SESSION's you can also use $_GET (as in the http://example.com/page.php?info=foo&account=bar way) to transfer information between pages.
User avatar
Derfel Cadarn
Forum Contributor
Posts: 193
Joined: Thu Jul 17, 2003 12:02 pm
Location: Berlin, Germany

Post by Derfel Cadarn »

Perhaps a posting of mine from a few days ago could be of help: have a look at this article on Sitepoint aboutManaging Users with PHP Sessions and MySQL could be of assistence?
It helped me a while ago!
Post Reply