Tag Archives: PHP Cookies

How to Code PHP Sessions & Cookies

In this article I’m going to talk about using cookies and sessions in PHP. I’ll provide many examples to help you learn how to code PHP and then in the next article run you threw some PHP code you can use on your own sites.

Cookies & Sessions

There are two main ways for you to store information on your visitors and create a dynamic site. Cookies are used to store information on the visitors computer. Much like you do with arrays, cookies are stored as a key value pair.

Many people are afraid of cookies, because they think those websites that use them are tracking their every move. For this reason it may be hard to serve up the dynamic content that you want. There are work arounds for those visitors that have cookies shut off as you’ll soon see. Continue reading How to Code PHP Sessions & Cookies