subscribe to receive this blog per email :: unsubscribe from the mailing list

Thursday, February 4, 2010

An Introduction to Web Technologies - part 3

In my blog post on 11 November, I introduced the web coding language PHP, and some of the things it is used for. Today I will look a little more closely at one of the most important applications of PHP coding: Login systems, sessions, and cookies (yum).


PHP does not only pull information *from* a database - for instance, to automate the building of product catalogues or image galleries - it also allows you to store user input *into* your database. One of the most common applications of this are page registration systems, or login systems.


Surely you have come across sites that ask you to register with a username and password. Most commonly, you will also be asked for a valid email address, and perhaps some other information such as age, gender, place of residence, occupation, etc. etc. Often, the site, or certain sections on the site, can only be accessed after user registration. Even more commonly, users can only leave feedback - on message boards, forums or blogs - after they have registered and logged in to the site.


As well as providing a measure of security and protection from spam robots, from the site owner's point of view, collecting this information is an easy and efficient way to do market research. It helps to build a database of people who are potentially interested in what the site owner has to offer. If people are interested enough in accessing the information on your site, to take the time to register themselves, then perhaps they will also be interested in receiving, say, a newsletter - and in eventually buying from you. Of course, anti spam legislation has to be respected: often the site registration form will give users the ability to opt in or out of receiving emails or additional information in the future.


A more advanced use of this technology is to provide users with personalized information. This can be very simple - for instance, greeting people by their name when they log in. An application of this I am working on at the moment, is to offer one of my clients the ability to provide their clients with personalized updates about their building projects. Instead of being sent an update by email each week, the idea is that clients will be able to log into the site and check on their project's progress at any time.


Some of these applications can be quite complex. Amazon's customer recommendations are an example of that - the site will recommend books based on what you have previously bought there, as well as on what other customers who have ordered the same items have also bought.


The time between an user logging into a site, and logging out again, is called a session. For the duration of the session, the site remembers who the user is and what previous information they have entered. This is usually achieved with a little piece of code, called a "cookie", which is stored on the user's computer. A cookie permanently stored on the user's computer enables a website to recognize a previously registered user, the next time they log in. Cookies can also be used to track user's browsing habits - Amazon's recommendations would not be possible without this tracking.


Most cookies are quite harmless, and are really only there to streamline your online experience and make everything go smooth. Tracking cookies, in particular, can be used for malicious ends though - be wary of accepting cookies from sites that look a bit dodgy!


Besides, the idea that someone might be able to track every website that an individual person clicks on does not sit comfortably with many people, including myself. And that's not because I visit a lot of porn sites, but simply because I am wary of the uses this can potentially be put to by, say, governments, or other institutions of power.


Even Amazon's elaborate recommendation system tends to leave a stale taste in my mouth. I prefer to make my buying choices myself. Not to mention, that they are usually completely off. Being presented with a selection of cooking and knitting magazines, on account of the information I have volunteered about my age and gender, does not sit well with this web and multimedia designer!


Asni: Multimedia Art & Design:: webdesign.asni.net :: www.asni.net

No comments:

Post a Comment