|
-
Apr 4th, 2004, 09:33 PM
#1
Thread Starter
Frenzied Member
Admin Send
how do I get this to send to all people on my sql database!!
PHP Code:
<?php
mysql_connect (localhost, user, pass);
mysql_select_db (nz);
if ($action == "save")
{
$result = mysql_query ("SELECT name, email, id FROM warriors_note ord id");
$to = "$email";
$subject = "Warriors Supporters Site Membership";
$body = "$name";
$headers = "From: Warriors.Rleague.Com<mailto:[email protected]>\n";
$headers .= "From: Feedback \n";
$headers .= "X-Sender: <[email protected]>\n";
$headers .= "X-Mailer: PHP\n"; // mailer
$headers .= "Return-Path: <[email protected]>\n"; //
$message = "Hi $name, thanks for registering your interest with our site. We will let you know once the site has opened for full memberships.";
$message .= "\n\n";
mail($to,$subject,$message,$headers);
echo "Sent!";
}else{
?>
<form method="POST" action="noteadmin.php?action=save">
<input type="hidden" name="action" value="save"/>
<p>Subject:<input type="name" name="suibject" size="20"></p>
<p>Body:<textarea rows="10" name="body" cols="50"></textarea>
</p>
</p>
<input type="submit" value="Register" name="B1"></
</form>
<?php
}
?>
Last edited by kiwis; Apr 4th, 2004 at 09:56 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|