I have three seperate messages in a MySQL database, and when the user selects one or more of them from a list of checkboxes, i want my script to email the message(s) to the user per the checkboxes he/she selected. i obviously have some big problems here, any help would be greatly appreciated.
$query1="SELECT message1 FROM checkboxes";
$result1 = mysql_query($query1)
or die ("<p>error mysqlQuery1");
$from = "From: Name <me@someplace.com>\r\n";
if ( $checkstuff1 == ""
//i dont know what condition goes here to signify
//whether or not the checkbox was selected or not
{
mail("$email","Requested Information","$result1","$from");
}
copy the above for message2 and message3
thanks, josh