|
|
|
ส่ง mail อะคับ อยากให้ส่ง messages ได้หลาย messagesอ่ะ คับ เช่น Tel Address อ่ะคับ |
|
|
|
|
|
|
|
Code (PHP)
$messages_send="Tel = $_POST[mess_tel]
Address = $_POST[mess_tel]";
|
|
|
|
|
Date :
2009-10-03 23:47:45 |
By :
webmaster |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (phpSendMailContactForm.html)
<html>
<head>
<title>ThaiCreate.Com PHP Sending Email</title>
</head>
<body>
<form action="phpSendMailContactForm.php" method="post" name="frmMain">
<table width="343" border="1">
<tr>
<td>To</td>
<td><input name="txtTo" type="text" id="txtTo"></td>
</tr>
<tr>
<td>Subject</td>
<td><input name="txtSubject" type="text" id="txtSubject"></td>
</tr>
<tr>
<td>Description</td>
<td><textarea name="txtDescription" cols="30" rows="4" id="txtDescription"></textarea></td>
</tr>
<tr>
<td>Form Name</td>
<td><input name="txtFormName" type="text"></td>
</tr>
<tr>
<tr>
<td>Form Email</td>
<td><input name="txtFormEmail" type="text"></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="Submit" value="Send"></td>
</tr>
</table>
<br>
<br>
<br>
</form>
</body>
</html>
Code (phpSendMailContactForm.php)
<html>
<head>
<title>ThaiCreate.Com PHP Sending Email</title>
</head>
<body>
<?
$strTo = $_POST["txtTo"];
$strSubject = $_POST["txtSubject"];
$strHeader = "Content-type: text/html; charset=windows-874\n"; // or UTF-8 //
$strHeader .= "From: ".$_POST["txtFormName"]."<".$_POST["txtFormEmail"].">\nReply-To: ".$_POST["txtFormEmail"]."";
$strMessage = nl2br($_POST["txtDescription"]);
$flgSend = @mail($strTo,$strSubject,$strMessage,$strHeader); // @ = No Show Error //
if($flgSend)
{
echo "Email Sending.";
}
else
{
echo "Email Can Not Send.";
}
?>
</body>
</html>
|
|
|
|
|
Date :
2009-10-03 23:50:55 |
By :
webmaster |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ขอบคุนคับ
|
|
|
|
|
Date :
2009-10-03 23:56:46 |
By :
olme |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ยังไม่ได้อ่ะคับ นี้เป็นฟอร์มส่งคับ
Code (PHP)
<FORM METHOD="POST" ACTION="mail_send.php"><TABLE>
<TR><TD><span class="style19">To :</span></TD>
<TD align="left"><span class="style19">[email protected] </span></TD></TR>
<TR><TD ><span class="style19">Subject :</span></TD>
<TD align="left"><INPUT TYPE="text" NAME="subject_send"> </TD></TR>
<TR><TD ><span class="style19">Tel :</span></TD>
<TD align="left"><INPUT TYPE="text" NAME="tel"> </TD></TR>
<TR><TD ><span class="style19">Add:</span></TD>
<TD align="left"><INPUT TYPE="text" NAME="Address"> </TD></TR>
<TR><TD><span class="style19">Messages :</span></TD>
<TD align="left"><TEXTAREA NAME="messages_send" ROWS="5" COLS="35">
</TEXTAREA></TD></TR>
<TR><TD><span class="style19">From :</span></TD>
<TD align="left"><INPUT TYPE="text" NAME="from_send"></TD></TR>
</TABLE><INPUT TYPE="submit" VALUE="Submit">
<INPUT TYPE="reset" VALUE="Reset">
</FORM>
ส่วนนี้ควรจะเขียนอย่างไรคับ
Code (PHP)
<?php
$to_send="[email protected]" ;
$subject_send=$_POST[subject_send];
$messages_send=$_POST[messages_send];
$from_send=$_POST[from_send];
$header="From: ".$from_send;
if (mail($to_send,$subject_send,$messages_send,$header)) {
echo "<meta http-equiv='refresh' content='0;URL=Contactas.html'>";
} else {
echo "<meta http-equiv='refresh' content='0;URL=Contactas.html'>";
}
?>
|
|
|
|
|
Date :
2009-10-04 00:08:56 |
By :
olme |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (PHP)
<?
$to_send="[email protected]" ;
$from_send=$_POST[from_send];
$header="Content-type: text/html; charset=windows-874\n";
$header.="From: ".$from_send;
$messages_send="
$_POST[tel]<br>
$_POST[messages_send]<br>
$_POST[Address]<br>
";
$subject_send=$_POST[subject_send];
if (mail($to_send,$subject_send,$messages_send,$header)) {
echo "<meta http-equiv='refresh' content='0;URL=Contactas.html'>";
} else {
echo "<meta http-equiv='refresh' content='0;URL=Contactas.html'>";
}
?>
|
|
|
|
|
Date :
2009-10-04 07:28:05 |
By :
webmaster |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Date :
2009-10-12 11:45:22 |
By :
apicha31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 05
|