I am trying to make an emailer for my teacher so if he needs to send an email to all the students he can from a web page. I don’t want to use a database for this or a text file. I am using a couple of if statements and trying to use the post and get.
Right now it doesn’t work. Another question I have is I am using the mail() function and in the quotation is who will recieve the email can you put a bunch of email address’s in there like
mail(“
here is one of the if statements and my form.
<?php
if ($_POST[‘submit’] && $
mail(“
echo “<div align=center>You emailed all the IWT students!</div>”;
echo “<hr color=black width=45%>”;
echo “</body></html>”;}
?>
<form method=”post” id=”emailstudents” action=”iwtemailer.php”>
Name:<br />
<input type=”text” name=”name” size=”25″ /> <br />
Email to:<br />
<input type=”checkbox” name=”alliwt”>All IWT Students <input type=”checkbox” name=”2ndiwt”>Second Year Students <input type=”checkbox” name=”1stiwt”>First Year Students
<br />
Subject:<br />
<input type=”text” name=”subject”><br />
Message:<br />
<textarea name=”message”></textarea>
<input type=”submit” value=”Submit” name=”submit”>
If someone could point me in the right direction I would be very grateful.