On Thursday 05 December 2002 05:58, Malcolm Brownell wrote: > Hi, > > I have some database fields I want to select and email. > > I have lines like -- > > $result = mysql_query("SELECT * FROM adopt_main order by idform desc limit > 1"); while( $row = mysql_fetch_array ($result)) > echo "".$row["first"].","; > > > There are quite a few of these paragraphs in the page -- 15 fields. The > page does just what I want. It echos the value, with commas and quotes, > all ready to be inserted, but, I can'tseem to figure out how to mail it. I > know I need to make all of this a variable to pass to my mail script, but > how ? My mail script work fine if I define $body and send that but I can't > seem to do that with this code.
In your while loop, instead of (or as well as) using echo, assign your values to $body -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* If something has not yet gone wrong then it would ultimately have been beneficial for it to go wrong. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php