Re: Send PHP results in email
| From: | Malcolm Brownell | Date: | Sun, 08 Dec 2002 20:26:08 +0000 |
| Subject: | Re: Send PHP results in email | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-127453@lists.php.net to get a copy of this message | ||
Thanks Jason,
I saw this a while ago and it solved the problem perfectly.
On Thu, 5 Dec 2002 06:11:40 +0800, php-general@gremlins.biz (Jason Wong) wrote:
> 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.
> */
>