Hmmm still not sending anything...
This is the code for the HTML side of things:
<form method="POST" action="maildatabase.php">
<p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Subject <br>
</font>
<input type="input" name="Subject" size="20" style="border: 1px solid #0B4694"><br>
<br>
<font face="Verdana, Arial, Helvetica, sans-serif" size="2">Message </font>
<br>
<textarea rows="8" name="Message" cols="62" style="border: 1px solid #0B4694"></textarea><br><br>
<input type="submit" name="Submit" value="Process" style="border: 1px solid #0B4694">
</p>
</form>
And this is the code as it stands for maildatabase.php:
<?php
$landps = array("mydatabase", "localhost", "myuser", "mypass");
$database = $landps[0];
$host = $landps[1];
$username = $landps[2];
$password = $landps[3];
$table = 'distributors';
$Subject = trim ($Subject);
$Message = trim ($Message);
$URL = 'myurl';
mysql_connect ($host,$username,$password) or die ("Failed login.");
mysql_select_db ($database) or die ("Failed to access db.");
$Message = addslashes ($Message);
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: $From <$Return>\r\n";
$result = mysql_query("SELECT email FROM distributors");
while ($row= mysql_fetch_array($result))
{
mail ($row['email'], "$Subject", "$Message", $headers);
}
header("Location: $URL");
?>
It's either the PHP or the HTML...blimin annoying tho! =/
Thanks so far for the effort guys!