Why use MySQL.... just save them in line into a text file...
collect the data from a Form... since you are just taking the email, load a text file, apend the new string with
$newstringfromfile .= "; $email";
and then over write the text file.
This will give you a text file with a string of email addys email 1; email 2; email 3. That you can copy into the to line of your e-mail
substitute ; with whatever string your e-mail program wants for separating email addys.
<?
function checkOK($field)
{
if (eregi("\r",$field) || eregi("\n",$field)){
die("Invalid Input!");
}
checkOK($_POST[email]);
$Title = "emails.txt";
$thestuff = fopen($Title, "r");
$newstringfromfile = fread($thestuff, 65000);
fclose($thestuff);
$newstringfromfile .= "; $_POST[email]";
$thesamestuff = fopen($Title, "w");
fputs($thesamestuff, $newstringfromfile);
fclose($thesamestuff);
?>
If anyone finds the txt file, they will be able to read the emails... if you don't care, fine... if you do... use a DB.. or... save them to a .php file starting with // so the php will read //;email 1;email 2... anyone attempting to look at it with a browser will get nothing... since Php is processed (and therefore the comment taken out) before it goes to the client.
You will have to take out the // before you send e-mails, though.
contents of emails.php
//
<?
function checkOK($field)
{
if (eregi("\r",$field) || eregi("\n",$field)){
die("Invalid Input!");
}
checkOK($_POST[email]);
$Title = "emails.php";
$thestuff = fopen($Title, "r");
$newstringfromfile = fread($thestuff, 65000);
fclose($thestuff);
$newstringfromfile .= "; $_POST[email]";
$thesamestuff = fopen($Title, "w");
fputs($thesamestuff, $newstringfromfile);
fclose($thesamestuff);
?>
Course... you could also create a mailer form just for yourself that reads the php, removes the //'s and lets you type into 2 boxes labeled subject and body, to mail to the whole list through your web server.