Need your help again.. Sorry...
| From: | Wee Keat | Date: | Sun, 21 Jul 2002 01:25:25 +0000 |
| Subject: | Need your help again.. Sorry... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-108684@lists.php.net to get a copy of this message | ||
Hi all...
Sorry for troubling you guys again... but I really do not know what else I could do.
Can you please tell me why this code fputs($write, "$productlist"); isn't printing
correctly?
I have already connected to db. Just this particular one didn't work... dun understand..
The Code:
fputs($write, "Email: $email\n\nProduct Enquired:");
while (list($key,$prod_id) = each($cart)) {
$cart[$key] = $prod_id;
$result = mysql_query("SELECT * FROM products WHERE prod_id = '$prod_id'
ORDER BY prod_brand ASC", $link_id);
$query_data = mysql_fetch_array($result);
$gst = 1.10;
$rrp = 1.12;
$price = $query_data["price_lq"] * $rrp * $gst;
$productlist .= "\n\n".$query_data["prod_brand"]."
".$query_data["prod_desc"]." $".number_format($price, 2, '.',
'');
fputs($write, "$productlist");
}
fputs($write, "\n\n-----------------------------");
Please help... thanks soooo much again.
Yours,
Wee Keat Chin
---------------------------------------------------
"Man is only truly great when he acts from his passions."