Reply to Re: emailing data from my DB...??

Your name:

Reply:


Posted by Ivαn Sαnchez Ortega on 12/21/07 18:41

paul814@excite.com wrote:

> On Dec 21, 1:05 pm, IvΓ‘n SΓ‘nchez Ortega <ivansanchez-...@rroba-
> escomposlinux.-.punto.-.org> wrote:
>> paul...@excite.com wrote:
>> > while ($row = mysql_fetch_array($result)) { // puts the values into
>> > $row
>> > print $row->editorialdate;
>> > print $row->editorialname;
>> > print $row->editorialcomments;
>> > }
>> [...]
>> > $txt = "$row[0] \n\r\n\rPLEASE DO NOT REPLY TO THIS EMAIL, THIS IS NOT
>> > A VALID EMAIL ADDRESS";
>> > $headers = "From: Daily_Prod._Rep...@company.com";
>> > mail($to,$subject,$txt,$headers); # <--- sends the email
>> [...]
>> > all I get is a blank email with no data in it from my database.
>>
>> > Anyone have any ideas?
>>
>> I'm not very sure *grin*, but maybe it's because you're printing the data
>> instead of storing it in the variable that will be fed to mail() ...
>
> How would I store it?

Geez.

$txt = '';
while ($row = mysql_fetch_array($result)) {
$txt .= $row->editorialdate;
$txt .= $row->editorialname;
$txt .= $row->editorialcomments;
}
(snip)
mail($to,$subject,$txt,$headers);


--
----------------------------------
IvΓ‘n SΓ‘nchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

Proudly running Debian Linux with 2.6.22-3-amd64 kernel, KDE 3.5.8, and PHP
5.2.4-2 generating this signature.
Uptime: 19:39:46 up 29 days, 5:55, 4 users, load average: 0.75, 1.34,
1.05

[Back to original 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

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация