Okay, I am going to try and describe this one more time. Its a little confusing.
I have a databaes with brochures in it. And I made a feild that is called publish. So in my sql statement on
http://64.177.187.63/brochures_01.php I say SELECT * FROM brochures WHERE publish = 1
And that is what spits out the brochures onto the page. And I submit the form and do a mail function. Everything works great. The mail sends iand everything. But, I some how need to get those brochures to send with it. So I was trying to do a "while" in my mail function to get all the brochures with pubish = 1 to get sent to me. Thats where I am stuck. Here is what I was trying.
<?
$db = mysql_connect("localhost", "*", "");
mysql_select_db("********",$db);
$result = mysql_query("SELECT * FROM brochures WHERE publish = '1' ORDER BY name", $db);
?>
<?
mail("myemail", "Brochures (webpage)", "Brochure Request Form\n-------------------------------------\n\n Name: $name\n E-mail: $email\n\nAddress: $address\n : $city, $state $zip\n\n
while ($query_data = mysql_fetch_object($result)) {
\n\n$query_data->name;
}
", "From: $email");
header("Location: brochures_01.php");
?>
Thanks again!