RE: [PHP] Can this be done with mail()?
| From: | John Holmes | Date: | Sat, 13 Jul 2002 22:09:43 +0000 |
| Subject: | RE: [PHP] Can this be done with mail()? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-107540@lists.php.net to get a copy of this message | ||
> I need to query a database and return a resultset. A php script will
then
> sort through the data and send the data to the browser in the form of
a
> table.
>
> Is it possible to gather the the results with html tags and store them
in
> a variable so that the results can be emailed to someone? If so, how
would
> this be done?
Instead of using print or echo to display the HTML table, just assign it
all to a variable. Then you can print it out later, or mail it, or
whatever.
Or use output buffering...
---John Holmes...