You are here: Re: emailing data from my DB...?? « PHP Programming Language « IT news, forums, messages
Re: emailing data from my DB...??

Posted by Evil Otto on 12/26/07 14:10

On Dec 24, 1:06 pm, paul...@excite.com wrote:
> On Dec 24, 12:40 pm, Iván Sánchez Ortega <ivansanchez-...@rroba-
>
>
>
> escomposlinux.-.punto.-.org> wrote:
> > paul...@excite.com wrote:
> > > If I echo $txt on the page....I get:
> > > PLEASE DO NOT REPLY TO THIS EMAIL, THIS IS NOT A VALID EMAIL ADDRESS
>
> > 'Cause you're overwriting $txr ...
>
> > Please stop trying things blindly, and start thinking about what your
> > program is doing.
>
> > --
> > ----------------------------------
> > Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-
>
> > Now listening to: Sigur Rós - Takk... (2005) - [5] Sé Lest (8:40)
> > (96.000000%)
>
> So what do I need to do to put editorialdate, editorialname, and
> editorialcomments in an email?

A better way to do this would be the following:

$txt = "PLEASE DO NOT REPLY TO THIS EMAIL, THIS IS NOT A
VALID EMAIL ADDRESS";

/* do your mysql work here */

while ($row = mysql_fetch_array($result))
{
$txt .= $row['editorialname'] . "\r\n";
/* do others */
}

then do your mail commands.

By the way, you realize that $headers has nothing in it, yes?

I'd suggest a refresher on the basics of PHP, as it looks like you're
just copying and pasting from several sources and hoping it'll work.
I suggest "CORE PHP Programming" as a good place to start. PHP isn't
like HTML; you can't just steal stuff out of context and expect it to
work.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация