View Full Version : Really easy question about collecting info from user

07-09-2007, 10:45 AM
what's the easiest way to collect a list of emails of people who visit my website, in a little box where they have the option of submitting their email if they want to be notified when my product is ready in the future?

It should just append their submitted email on a new line of a txt file somewhere that I can retrieve later.

Halp! I need codes. :)


07-09-2007, 11:02 AM
Create the html form for the email.
Validate that the email is a valid email address. (link (http://www.ilovejackdaniels.com/php/email-address-validation/))
Use fopen (http://www.php.net/fopen) and fwrite (http://www.php.net/fwrite) to append the new email address to the file. (You're probably going to want to use fopen in "a" mode.