Welcome to WebmasterWorld Guest from 184.108.40.206
$query = "INSERT INTO `table` (`email`,`timestamp`) values ('".mysql_real_escape_string($email)."','$date')";
$result = mysql_query($query) or die(header('Location: /index.php?err=dupe_email'));
It's a bit ugly (assumes any error = dupe email, as that's a unique field)
I have a very simple form where it just has a spot to put in an email, and a submit button.
When you submit, it adds the email to the db with a timestamp, and lets you know it was a success.
But how would I handle multiple emails? I would like to allow the user to put in a comma-delimited list of email addresses (e.g.
And add them all at the same time.
I don't need it to give an individual status update per email (e.g. "email@example.com already exists") when it's multiple, I just need to add them to the database.