Hi all,
Please could you help me here...
The below won't send an email.
Any ideas why?
while ($row = mysql_fetch_assoc($result))
{
echo '<tr><td>';
echo $row['course'];
echo '</td><td></td><td>';
echo $row['student'];
echo '</td><td></td><td>';
echo $row['ffnumber'];
echo '</td><td></td><td>';
echo $row['date'];
echo '</td><td></td><td>';
echo '<input type="checkbox" name="email[]" value='.$row['ffnumber'].' />';
echo '</td></tr>';
}
// Declare Variables
$email = $_POST['email'];
foreach ($email as $key => $value)
{
$value .= '@mysite.com';
//echo $key .'=>'. $value.'<br />';
// send mail
(@mail($value, $subject, $content, $headers))?print 'Sending email to '.$value." was successful.<br>\n" : print 'Sending email to '.$value." failed.<br>\n";
}