Home arrow PHP arrow Developing a User Personalization System with PHP and Cookies

Developing a User Personalization System with PHP and Cookies

Making your site more appealing to repeat traffic is always a priority among web developers. However users of your site are likely to be coming to your site for different reasons. This tutorial will teach you how to use PHP and cookies to make your site more user-customizable and therefore more likely to attract repeat users.

  1. Developing a User Personalization System with PHP and Cookies
  2. Grabbing Headlines
  3. User Login
  4. Reading from Cookies
  5. Conclusion
By: Duncan Lamb
Rating: starstarstarstarstar / 6
September 20, 1999

print this article


Everyone is looking for ways to make their sites attract more repeat traffic. Even after you have content, bulletin boards and search functions, there's still more you can do. As you probably know, different people that come to your site probably come for different parts of your site, but there's no way to please everyone, is there?

This tutorial will show you a way to give it a shot. Using mainly PHP3 and MySQL, we'll construct a small site that uses cookies to detect specific users who have visited the site before, and customize a page for them based on things they have indicated they would like to see, and do it without prompting. In other words, we're going to construct a smart, responsive site with techniques easily adaptable to just about any concept for a site you can think of.

In this example, we will take some headlines from a couple of sites some people may visit often, then make a form to collect logins and preferences, and store it all in a database. Every time the user returns, a script reads their cookie, retrieves their preferences, and builds a page showing what they want to see. We'll start out with a smattering of Perl to help us automate collecting those headlines.

>>> More PHP Articles          >>> More By Duncan Lamb

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates


Dev Shed Tutorial Topics: