![]() Join Up! 96812 members and counting! |
|
|||
Creating an Online Survey - Part 1
Brett Patterson
We've all come across some sort of online survey that asks a few questions about our interests or our online shopping experience. In this article we're going to walk you through the creation of a similar online survey that you can use on your own web site.
Basically we're going to create a survey of 10 to 12 questions that gather information about the user, as well as their views and opinions. We'll do this in two ways. The first way we're going to do this is to email a reader the survey results. They will be formatted in a readable manner, and then emailed using PHP's internal mail() function. The other way we're going to collect the data is by storing it in a database. Instead of making it so only one person sees the results, we'll also create a results page and calculate exactly how many people have voted for each answer. Setting Up the Survey
To begin, we need to think of some basic survey questions. I've come up with 10 questions for our users to answer about the support they just received. This is just a typical survey about user satisfaction. Here are the questions we're going to use:
Very-Dissatisfied | Dissatisfied | Satisfied | Very Satisfied | Neutral So, now that we have a scale, we can set up our HTML page. Here is how the HTML code appears: click to open new window to view the HTML code
As you can see, we've got a table with our questions and answers as radio buttons, and a submit button. When the user answers all the questions and clicks submit, they will be taken to "process.php" and that's where we'll grab their response and email out the information.
|