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.

TABLE OF CONTENTS:
  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
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement
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
   

PHP ARTICLES

- 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...
- PHP: Building Concrete Validators
- Sanitizing Input with PHP
- Executing Shell Commands with PHP
- Handling File Data with PHP
- File Security and Resources with PHP
- ArrayObject PHP Class Examples
- ArrayObject PHP Class: An Introduction
- Getting File System Data with PHP
- PHP Tools for Working with the File and Oper...
- Working with the File and Operating System w...
- PHP Proxy Patterns: Completing a Blog


© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 7 - Follow our Sitemap

Dev Shed Tutorial Topics: