How do I collect email addresses?
February 18, 2008 6:54 AM
Subscribe
I need to code a form to gather contact information from visitors to my website, and I'm looking for alternatives to mySQL.
I need to make a form that collects name, address, phone number, and email address from visitors to a website. Our hosting company provides PHP, but as near as I can tell, they don't offer SQL. Unfortunately, the bosses really don't want to switch providers since the hosting company is owned by one of their friends.
Any suggestions on what I can do? I really don't want to just make the form send me an email. Can I have this thing output to a CSV, or an Access file or something? We're running some version of Apache on some sort of Unix (I can't be more specific because they have that stupid mod_security installed, and I don't have shell access).
Thanks!
posted by fvox13 to computers & internet (10 comments total)
5 users marked this as a favorite
Don't put the file in the webroot.
$fp = fopen('file.csv','a');
fprintf($fp, "%s, %s\r\n", $name, $email);
fclose($fp);
posted by Leon at 7:04 AM on February 18, 2008