Re: Send PHP results in email

From: Date: Wed, 04 Dec 2002 22:11:40 +0000
Subject: Re: Send PHP results in email
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-127043@lists.php.net to get a copy of this message
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. */

« previous php.general (#127043) next »