|
 |
|
ส่งเมล์แล้วอัพเดทฟิวล์ไอดีที่ส่งตะกี้อ่ะคับ ้ถ้าหากเราส่งเสร็จเราจะอัพเดทฟิว ว่า ส่งแล้วให้เป็ฯ 1 ต่อไหนดีครับ คิดเอง งงเอง ช่วยคิดหน่อยครับ |
|
 |
|
|
 |
 |
|
ยังไงหรือ งง
คือว่า ถ้าส่ง email สำเร็จแล้วให้ไปอัพเดชฟิว ให้เป็น 1 หรือครับ
|
 |
 |
 |
 |
Date :
2010-02-12 11:09:00 |
By :
somparn |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
แม่นแล้วครับ
ได้ละครับขอบคุณครับ
Code (PHP)
mysql_select_db($database_connection, $connection);
$query_rs_requestsendmail = "SELECT * FROM tbl_request WHERE request_sendmail = 0";
$rs_requestsendmail = mysql_query($query_rs_requestsendmail, $connection) or die(mysql_error());
$row_rs_requestsendmail = mysql_fetch_assoc($rs_requestsendmail);
$strTo = "text@localhost";
$strSubject = "Test Send Email";
$strHeader = "Content-type: text/html; charset=UTF-8\n"; // or UTF-8 //
$strHeader .= "From: Mr.Weerachai Nukitram\nReply-To: [email protected]";
$strVar = "My Message";
$strMessage = "
<h1>My Message</h1><br>
<table border='1'>
<tr>
<td>พนักงาน</td>
<td>ขอกรมธรรม์</td>
<td>จำนวน</td>
<td>วันที่</td>
<td>รายละเอียด</td>
</tr>";
do {
$strMessage .= "
<tr>
<td>".$row_rs_requestsendmail['member_id']."</td>
<td>".$row_rs_requestsendmail['insurance_id']."</td>
<td>".$row_rs_requestsendmail['insurance_total']."</td>
<td>".$row_rs_requestsendmail['insurance_total']."</td>
<td>".$row_rs_requestsendmail['insurance_total']."</td>
</tr>";
(ผมสั่งให้อัพเดทมันตรงนี้เลย ใช้ WHERE request_id = $row_rs_requestsendmail['request_id'])
} while ($row_rs_requestsendmail = mysql_fetch_assoc($rs_requestsendmail));
$strMessage .= "</table>";
$flgSend = @mail($strTo,$strSubject,$strMessage,$strHeader); // @ = No Show Error //
if($flgSend)
{
echo "Email Sending.";
}
else
{
echo "Email Can Not Send.";
}
|
 |
 |
 |
 |
Date :
2010-02-12 11:40:26 |
By :
ความรู้เท่าหางอึ่ง |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 01
|