html mail don't show
Posted: Thu May 19, 2005 6:18 pm
i'm having trouble with this email code.. it send the email but the variable $kari showed nothing. can anyone help me figure out please? thank a bunch.
Code: Select all
<?php
$headers = "e;From: "e; . $_POSTї'myID'];
$headers .= "e;<"e; . $_POSTї'email'] . "e;>\r\n"e;;
$headers .= "e;Reply-To: "e; . $_POSTї'email'] . "e;\r\n"e;;
$headers .= "e;Content-type: text/html;\r\n charset=\"e;iso-8859-1\"e;\r\n"e;;
$z = $_POSTї'myID'];
include "e;mysql.connect.php"e;;
mysql_select_db("e;test"e;) or die("e;Could not select database"e;.mysql_error());
$query = "e;SELECT DISTINCT custName FROM stock WHERE myID='$z'"e;;
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
$kari = mysql_result($result);
$cant = 0;
while($row=mysql_fetch_array($result)){
echo "e;reflect$cant=$rowїreflect]&"e;;
$cant++;
}
// create message body
$body = "e;
<html>
<head>
<title>test displaying stock</title>
</head>
<body>
<p>Customer name</p>
<table>
<tr>
<th>Name</th><th> </th>
</tr>
<tr>
<td>$kari</td>
</tr>
</table>
</body>
</html>
"e;;
//send the message
mail("e;yeahman@nono.com"e;,"e;send results"e;,$body,$headers);
?>