TIL How to Make and Use PHP Cookies

When I first created popRock, I had a heck of a time getting the artistID session variable to travel from page to page — so you could see various charts and lists for the artist chosen from my hideously coded Choose Artist menu on the choose_artist page. I finally got it working but, a couple months ago, I switched hosting plans and the app stopped working.

I still haven’t converted it all to AJAX as mentioned in the aforelinked link, but in the meantime, everything is working again because I finally gave PHP cookies a chance. Yay. I wish I’d used them from the beginning it is SO easy! But I read countless articles about why you shouldn’t use them and should use sessions instead. Well, sessions can kiss my butt as I walk out the door because I’m breaking up with them.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s