Hi All, Having a small problem with inputing some info into the php mail() function. What I have at the moment is $edquery = "SELECT institute, degree, subject, year from jobs_r_education, jobs_degree, jobs_subject WHERE jobs_r_education.fk_degree = jobs_degree.id AND jobs_r_education.fk_subject = jobs_subject.id AND rid = '$rid' ORDER BY year"; $result = mysql_db_query($database, $edquery, $connection) or die ("Error in query: $edquery. " . mysql_error()); if(mysql_num_rows($result) > 0){ while (list($institute, $degree, $subject, $year ) = mysql_fetch_row($result)){ $education = "Institute: $institute,<ul>Degree: $degree,<br>Subject: $subject,<br>Year Completed: $year</ul>"; echo "$education"; } } Code (markup): This works like a bomb and the "echo "$education"; " outputs all returned responses to the screen perfectly However, when $education is included in the message part of mail(), only the last record is inserted into the mail. Any help greatly appreciated....... PS....my php knowledge is relatively light, so please be gentle Cheers
You're not building upon $education. You're setting it anew each time. Try $education .= That will deliver what you want. echo looks OK because you're outputting each result but not correctly assigning the results to $education. http://www.php.net/manual/en/language.operators.assignment.php php.net is your friend. - Bob Archer http://www.tropicrentals.com - Vacation Rentals Online.