Hi Sarah:
I tried your method and it worked! Thanks for that, but as the body of the email is dynamically generated I'm using a while loop within the whole thing and this may be messing it up - why should it though?
Code is as below:
<?php
//Start off email body:
$bullet_body = "Someone has just signed-up";
$bullet_body .= "\nUsername: $username\n";
$bullet_body .= "Events signed up for:"\n\n";
/
Start off SQL query - inserting available values into table:
/
while(list($key) = each($signup)) {
$query = mysql_query("INSERT INTO $table_ifchk (username,email,signedup4) VALUES ('$username','$email','$key')");
$list = "<p align=\"center\">";
$list .= "<b>'</b>";
$list .= "$key";
$list .= "<b>'<b><br>";
$list .= "</p>";
//Display choices on page
echo $list;
//Continue with dynamic part of email body:
$bullet_body .= "* ";
$bullet_body .= $key;
$bullet_body .= "\n\n";
}
//end while loop
//Continue with rest of email body footer:
$bullet_body .= "User $username, is now waiting for confirmation";
//use php's mail() function to do the rest!
$mail_to = "r.j.michell@apu.ac.uk";
$subject = "Sign-up confirmation\n";
$body = $bullet_body;
$from = "me@mydomain.com\n";
mail("$mail_to","$subject","$body","From: $from");
?>
Like I said - your way worked but because mine involves this loopy stuff - php doesn't wanna know. Any ideas anyone?
Cheers again for everyone's efforts! 🙂
Russ