Re: Sending data in table, multiple rows, via mail()

From: Date: Tue, 09 Jul 2002 10:57:43 +0000
Subject: Re: Sending data in table, multiple rows, via mail()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-106328@lists.php.net to get a copy of this message
Thank you for your *extreme* kindness... I do not know where to begin to make this happen. I created a variable and ran the entire do while loop to read contents of the table and tried storing them in the variable, which could be used as Content of the mail. However, i just get the Last Row in my DB Table sent in mail.. not all the rows. Following is part of the code i'm using, and it could be absolutely wrong, but that's all i know.. <? $db = mysql_connect("localhost","user", "pwd"); mysql_select_db("tbl",$db); $result = mysql_query("SELECT * FROM cart where sid='$s'",$db); $realcontent=" if ($myrow = mysql_fetch_array($result)) { do { $myrow[pid]<br> $myrow[nm]<br> $myrow[q]<br> } while ($myrow = mysql_fetch_array($result)); } "; $to = "thomasedisonjr@yahoo.com"; $subject = "Purchase order Website"; $from = "Purchase Order"; $stuff = " Name : $name\n Phone : $phone\n Fax : $fax\n Email : $email\n Address : $address\n Country : $country\n Order:\n\n $realcontent\n\n"; mail($to,$subject,$stuff,$from); ?> __________________________________________________ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com

« previous php.general (#106328) next »