Developing a User Personalization System with PHP and Cookies (
Page 1 of 5 )
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.
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.