รบกวนดูcodeส่งmailให้ทีค่ะ

Post a reply

Smilies
:icon_plusone: :like: :plusone: :gfb: :-D :) :( :-o 8O :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: :angry: :baa: :biggrin:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: รบกวนดูcodeส่งmailให้ทีค่ะ

by mindphp » 28/03/2008 7:34 pm

ดูแล้วครับ

รบกวนดูcodeส่งmailให้ทีค่ะ

by click5 » 28/03/2008 6:30 pm

มันฟ้องerrorน่ะค่ะ

<?
include ".../connect.php";

$subject=$_POST[subject];
$messages=$_POST[messages];


if($subject=="" or $messages==""){
echo "Subject and Messages are required.";
}else{
$Headers = "MIME-Version: 1.0\r\n" ;
$Headers .= "Content-type: text/html; charset=utf-8\r\n" ;
$Headers .= "From: PM.com\r\n" ;
$Headers .= "Reply-to: PM.com\r\n" ;
$Headers .= "X-Priority: 3\r\n" ;
$Headers .= "X-Mailer: PHP mailer\r\n" ;

$sql="select * from tb_list";
$result=mysql_db_query($dbname,$sql);
while($rs=mysql_fetch_array($result)){
$to=$rs[email];
mail($to,$subject,$messages,$Headers);
}
echo "E-mail have been send.";
}
echo "Back to<a href=admin.php>[Mailing List]</a>"
?>

--------------------------------------------------------------------------------------------------------------------
error:

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in c:\ip1\ip1\mysite.com\www\admin\admin_send2.php on line 20

Top