Code:-
<?php
$senderheaders = "From: dept@xyz.com\r\n";
$senderheaders .= "Content-type: text/html\r\n";
$subject="Dept Category Item Detail";
$sendId='test@xyz.com';
$textTosend='
<table width="700px" align="center">
<tr>
<td colspan="3" align="center" class="title" height="30px"><strong>Category Item Detail </strong></td>
</tr>
<tr>
<td >
<strong>Item Name</strong> </td>
<td >
<strong>Item Cost</strong> </td>
<td >
<strong>Item Qty.</strong> </td>
</tr>';
$selItem="select * from item where cate_id=$Id";
$itemRs=mysql_query($selItem,$dbc);
while($itemRow=mysql_fetch_array($itemRs)){
$itemDetail=itemDetail($itemRow["product_id"],$dbc);
$textTosend.='<tr>
<td >
'.$itemDetail["item_name"].' </td>
<td >
'.$itemDetail["price_unit"].' </td>
<td >
'.$itemRow["quantity"].' </td>
</tr>
';
}
$textTosend.='</table><br>
';
if(mail($sendId,$subject,$textTosend,$senderheaders)){
echo '<div class="success">Echo Mail Send SuccessFully</div>';
}
?>
wheres the function? because I always got an error on itemDetail()
ReplyDeleteitemDetail() is a function that is use for get some information from other table u no need to use that function remove it and use variable directly
ReplyDeleteHi Omkar I already used the method but it will only send 1 result to the email and the other details wont send. for example 1 banana, 1 mango and in the email only 1 banana will appear.
ReplyDeleteHi thank you so much Omkar I already got it....
ReplyDelete