One of the simplest and most popular add-ons to a Web site is anonline poll, allowing visitors to vote on hot-button issues. In thisarticle, find out how PHP can be used to build a powerful, good-lookingonline poll for your Web site, and also learn a little bit about its imageand cookie manipulation functions.
In your travels across the Web, you've probably seen (maybe even participated in) online polls, quick measurements of what visitors to a site think of the hot-button issues of the day. And back when portals where a Good Thing, online polls appeared on each and every one of them; they were - and still are - a simple and effective method of promoting a sense of community amongst the visitors to a Web site, and of generating demographic data on a site's visitors.
If you have a Web site of your own, an online poll offers a quick way to find out what your visitors are thinking, to add an element of dynamism to your Web site, and to have a few laughs (you'd be surprised how many Internet users, when polled, think that Elvis is still alive!)
Building an online poll isn't very hard; as a matter of fact, with a middling knowledge of PHP, you can slap one together in a couple of hours. And you won't even need a degree in rocket science to accomplish this feat - PHP makes it so easy to build and maintain a Web application like this that you'll wonder why you never did it before.
Over the next few pages, I'm going to demonstrate this by showing you how to build a simple polling system, one which you can quickly integrate into your own Web site. And if you're new to PHP, the process should also offer some insight into how to apply PHP's capabilities to a real-world problem, and create a simple and elegant solution.
Not a believer? Don't take my word for it - taste the pudding for yourself...
This article copyright Melonfire 2001. All rights reserved.