I need to generate some kind of survey form to gather data on how our visitors found our website(s).
Whats the best way to make this? Php file that edits an html file that I can view?
Help!
Thanks...
Member
From: Pell City, Alabama USA
Registered: 2004-11-17
Posts: 2084
I've been thanked 5 times.
Offline
OK well first you make your form. Thats the easy part.
Then you make a database table, and match the column names to the form's element names. Make sure that they match exactly because it makes the rest of the code easier
then you make a PHP file to process the form, point the forms action at the PHP file, then do a
foreach ($_POST as $key => $value) {
// build the SQL in here
}
and build a SQL INSERT from the form's element values ( thats why you made the names match - so it saves you time and coding )
we've talked about this before - so use the forums search feature and you'll find a more complete example
TombOfTheMutilated.NET - Destroying The Minds of America's Youth Since 2001
Member
From: Philadelphia, PA
Registered: 2004-10-20
Posts: 718
I've been thanked 11 times.
Offline
Isn't easier just to use Statcounter or related kind of service to find out where your visitors are coming from?
http://spauldingtbear.bravejournal.com
http://spauldingtbear.tripod.com/spauld … index.html
The next President of the United States of America
I got everything figured out now.
atwhatcost - no, it wouldn't be viable, in this case, to use some kind of third party service. We're doing some other advertising that is driving 'direct request' visitors. So we're trying to measure which of those channels are working.
Granted, the numbers will be skewed to say the least. Not everyone votes. So I'll just measure the data appropriately when that time comes.
| Never |


