i want to send mail with data from database and using php mail() this is my code :
<?php
class emailKoala{
public function __construct()
{
}
public function kirimEmailDaftar($email,$name,$order_id,$order_hargatotal){
include "../config.php";
$sqlbank="SELECT * FROM `bank`";
$querybank=mysql_query($sqlbank);
$to = "$email";
$subject = "order information!";
$message = 'thanks :) this is bank account
<table>
<tr>
<th>Bank</th>
<th>Number</th>
<th>Other</th>
</tr>'.while($arraybank=mysql_fetch_array($querybank)){
.'<tr>
<td>'.$arraybank['bank'].'</td>
<td>'.$arraybank['norek'].'</td>
<td>'.$arraybank['ket'] .'</td>
</tr>'.}.
'id order :'.$order_id.',shop again! ';
$headers = 'MIME-Version: 1.0' . "\r\n".
'Content-Type: text/html; charset=ISO-8859-1' . "\r\n".
'From: shoesshe <[email protected]>' . "\r\n" .
'Reply-To: shoesshe <[email protected]>' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
}
}
i was try like that but
Parse error: syntax error, unexpected T_WHILE in /model/email.php on line 34
i was try before using text only and thats work, i just want to send data to that mail with table using while..
anyone can help me?