|
|
|
ผมต้องการทำระบบส่งเมล์ลครับ ตามรูปด้านในครับ ขอบคุณทุกท่านมากครับ |
|
|
|
|
|
|
|
Code (PHP)
<html>
<head>
<title>ThaiCreate.Com PHP & MySQL Tutorial</title>
</head>
<body>
<?
$objConnect = mysql_connect("localhost","root","root") or die("Error Connect to Database");
$objDB = mysql_select_db("mydatabase");
for($i=0;$i<count($_POST["chkEmail"]);$i++)
{
if($_POST["chkEmail"][$i] != "")
{
$strTo = $_POST["chkEmail"][$i];
$strSubject = "Test Send Email";
$strHeader = "Content-type: text/html; charset=windows-874\n"; // or UTF-8 //
$strHeader .= "From: my Name \nReply-To: [email protected]";
$strVar = "My Message";
$strMessage = "
<h1>My Message</h1><br>
<table width='285' border='1'>
<tr>
<td><div align='center'><strong>My Message </strong></div></td>
<td><div align='center'><font color='red'>My Message</font></div></td>
<td><div align='center'><font size='2'>My Message</font></div></td>
</tr>
<tr>
<td><div align='center'>My Message</div></td>
<td><div align='center'>My Message</div></td>
<td><div align='center'>My Message</div></td>
</tr>
<tr>
<td><div align='center'>".$strVar."</div></td>
<td><div align='center'>".$strVar."</div></td>
<td><div align='center'>".$strVar."</div></td>
</tr>
</table>";
@mail($strTo,$strSubject,$strMessage,$strHeader); // @ = No Show Error //
}
}
echo "Record Insert.";
mysql_close($objConnect);
?>
</body>
</html>
Go to : PHP Multiple Checkbox
|
|
|
|
|
Date :
2012-02-08 06:08:47 |
By :
webmaster |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ขอบคุณมากคัฟพี่ ^^
|
|
|
|
|
Date :
2012-02-09 20:20:22 |
By :
onekisz |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 05
|