<?
$subject=$_POST[topic];
$messages=$_POST[messages];
if ($subject=="" or $messages=="") {
echo "<H3>ERROR : กรอกข้อมูลให้ครบเป็นมั้ย?</H3>";
} else {
$from= "ส่งmailไม่ไปค๊าบ@hotmail.com";
$header="From: $from\n";
$header.="Content-Type: text/html; charset=windows-874\n";
include "connect.php";
$sql="select * from tb_list";
$result=mysql_db_query($dbname,$sql);
while ($rs=mysql_fetch_array($result)) {
$to=$rs[email];
mail ($to,$subject,$messages,$header);
}
echo "<H3>จากศูนย์ปฏิบัติการ ส่งอีเมลล์เรียบร้อยแล้วครับท่าน</H3>";
}
echo "[ <A HREF=admin_send.php> กลับไปแบบฟอร์มส่งข่าวสาร</A>]";
?>
PS. ชื่อฐานข้อมูลถูกต้องครับ
PS. รับข้อมูลจากแบบฟอร์มได้ปกติครับ
แต่ว่าส่งแล้วไม่ได้รับเมลล์ครับ ฮือๆ script ผิดรึเปล่าครับผม