Fixed. it. Damn it. It was easy, but not obvious, which I am learning seems to be pretty standard, especially for beginners like me.
In the end it all I had to do was put the session_start() command at the very beginning. Before anything. Including the DOCTYPE line. W3Schools.com says to put it before the <html> line, but it has to go even higher.
I thought it was weird that the code to create the cookies had to come first. What idiot puts code before the start of the program, was what I was thinking, but that was the only thing that worked, and yes, I could stick my function CreateNewCookie in there, too.
So that sent me back to php.net to read up more on session_start and there were many accounts of problems like what I was having, with solutions. One was
Many thanks, alakys. I suffered plenty before I found your post and tried it so I didn't save much time, but damn I was getting headaches, cramps, a really sore butt, and was close to giving up, and I would have hated myself forever for that.
Originally Posted by alakys
I'll put it to bed tonight, get another late dinner, and will turn up my amp and bang on my guitar until I get some of this out of my system. It's 9:30 PM on a Saturday. The neighbors will understand.
P.S. How the hell did I ever get this to work at all? For the past week or so SESSIONS was working for me, on this one machine.
Last edited by m610; 08-18-2012 at 11:27 PM.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)