I am writing a script which sends out emails to people who sign up.
The signees are on an mySQL database, and the script sends the email to each email individually...
Thing is, when it gets to the end of the rows in the DB, instead of it displaying a continue button, which I'd hoped, I get a scary 500 internal error
The code below is what I use as mail.php... please take a look, and let me know if the error is obvious, or in fact it should display what i ask
Make Sense? I hope so (-:
The signees are on an mySQL database, and the script sends the email to each email individually...
Thing is, when it gets to the end of the rows in the DB, instead of it displaying a continue button, which I'd hoped, I get a scary 500 internal error
The code below is what I use as mail.php... please take a look, and let me know if the error is obvious, or in fact it should display what i ask
Code:
<?php
$id=$_POST["id"];
$to=$_POST["email"];
$subject =$_POST["subject"];
$message=$_POST["message"];
$from =$_POST["from"];
$headers = "From: $from";
?>
<?php
if (isset($_POST["email"]))
{
mail($to,$subject,$message,$headers);
echo $to,$subject,$message,$headers;
echo "<body onLoad='document.tostartmail.submit();'>";
echo "<form action='start_mail.php' method='post' name='tostartmail'>";
echo "<input type='text' value='";
echo $id+0;
echo "' name='prev_id'>";
echo "<input type='text' value='";
echo $from;
echo "' name='from'>";
echo "<input type='text' value='";
echo $subject;
echo "' name='subject'>";
echo "<input type='text' value='";
echo $message;
echo "' name='message'>";
echo "<input type='submit'>";
}
else
{
echo "Continue";
}
?>
</form>
</body>
Make Sense? I hope so (-: