|
|
|
การส่งข้อความจาก textbox ไปยัง e-mail ผมทำตามโค๊ดแล้วมัน error ครับ ใครสามารถอธิบายได้บ้างครับ? |
|
|
|
|
|
|
|
ขอดู code หน่อยครับจะได้บอกได้ตรงจุด
|
|
|
|
|
Date :
2009-05-12 15:58:09 |
By :
kanchen |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ลองเอา เครื่องหมาย @ ออกแล้ว ดู error คับ
|
|
|
|
|
Date :
2009-05-12 16:01:20 |
By :
pjgunner |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ผมไม่รู้จะตัดเอาส่วนไหนมาดีครับ มันงง ก็เลยเอามาทั้งหมดเลย นี้เป็นหน้าที่มีปุ่ม submit นะครับ
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<form action="contact2.html" method="post" name="frmMain">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Chiangmai Zoo Aquarium : ที่สุดแห่งประสบการณ์ โลกใต้น้ำสวนสัตว์ เชียงใหม่ </title>
<style type="text/css">
<!--
@import url("images/styles.css");
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-image: url(images/bg.jpg);
}
-->
</style>
<script type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<link href="images/style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style2 {font-weight: bold}
.style3 {font-weight: bold}
.style4 {font-size: 24px}
.style8 {color: #CC3366; font-family: "Times New Roman", Times, serif; }
-->
</style>
</head>
<body onload="MM_preloadImages('images/na3.1.jpg','images/na4.1.jpg','images/na5.1.jpg','images/na6.1.jpg','images/na7.1.jpg','images/na8.1.jpg','images/na9.1.jpg','images/na10.1.jpg','images/na11.1.jpg','images/me1.1.jpg','images/me2.1.jpg','images/me3.1.jpg','images/me4.1.jpg','images/me5.1.jpg','images/me6.1.jpg','images/me7.1.jpg')">
<div align="center">
<table width="100" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="936" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="29"><a href="index.html"><img src="images/na1.jpg" name="Image11" width="29" height="26" border="0" id="Image11" /></a></td>
<td width="154"><img src="images/na2.jpg" width="153" height="26" /></td>
<td width="44"><a href="fee.html"><img src="images/na3.jpg" name="Image1" width="44" height="26" border="0" id="Image1" onmouseover="MM_swapImage('Image1','','images/na3.1.jpg',1)" onmouseout="MM_swapImgRestore()" /></a></td>
<td width="96"><a href="booking.html"><img src="images/na4.jpg" name="Image2" width="95" height="26" border="0" id="Image2" onmouseover="MM_swapImage('Image2','','images/na4.1.jpg',1)" onmouseout="MM_swapImgRestore()" /></a></td>
<td width="81"><a href="dairy_hour.html"><img src="images/na5.jpg" name="Image3" width="80" height="26" border="0" id="Image3" onmouseover="MM_swapImage('Image3','','images/na5.1.jpg',1)" onmouseout="MM_swapImgRestore()" /></a></td>
<td width="91"><a href="getting.html"><img src="images/na6.jpg" name="Image4" width="90" height="26" border="0" id="Image4" onmouseover="MM_swapImage('Image4','','images/na6.1.jpg',1)" onmouseout="MM_swapImgRestore()" /></a></td>
<td width="77"><a href="floor_plan.html"><img src="images/na7.jpg" name="Image5" width="77" height="26" border="0" id="Image5" onmouseover="MM_swapImage('Image5','','images/na7.1.jpg',1)" onmouseout="MM_swapImgRestore()" /></a></td>
<td width="101"><a href="image_gallery.html"><img src="images/na8.jpg" name="Image6" width="100" height="26" border="0" id="Image6" onmouseover="MM_swapImage('Image6','','images/na8.1.jpg',1)" onmouseout="MM_swapImgRestore()" /></a></td>
<td width="101"><a href="job_volunteer.html"><img src="images/na9.jpg" name="Image7" width="100" height="26" border="0" id="Image7" onmouseover="MM_swapImage('Image7','','images/na9.1.jpg',1)" onmouseout="MM_swapImgRestore()" /></a></td>
<td width="71"><a href="about_us.html"><img src="images/na10.jpg" name="Image8" width="71" height="26" border="0" id="Image8" onmouseover="MM_swapImage('Image8','','images/na10.1.jpg',1)" onmouseout="MM_swapImgRestore()" /></a></td>
<td width="91"><a href="contact_us.html"><img src="images/na11.jpg" name="Image9" width="90" height="26" border="0" id="Image9" onmouseover="MM_swapImage('Image9','','images/na11.1.jpg',1)" onmouseout="MM_swapImgRestore()" /></a></td>
</tr>
<tr>
<td height="238" colspan="11" valign="top"><img src="images/banner.jpg" alt="Chiangmai Zoo Aquarium" width="935" height="239" /></td>
</tr>
</table>
<div align="left"></div>
<div align="center">
<table width="935" border="12" cellpadding="0" cellspacing="0" bordercolor="ccccff" bgcolor="#FFFFFF">
<tr>
<td width="909" height="1108" align="center" valign="top"><table width="899" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="224" height="638" valign="top" bgcolor="#FFFFFF"><table width="224" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="243" height="638" align="left" valign="top"><table width="200" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="27"><img src="images/menu1.jpg" width="224" height="36" /></td>
</tr>
<tr>
<td height="32"><a href="news.html"><img src="images/me1.jpg" name="Image10" width="224" height="32" border="0" id="Image10" onmouseover="MM_swapImage('Image10','','images/me1.1.jpg',1)" onmouseout="MM_swapImgRestore()" /></a></td>
</tr>
<tr>
<td height="19"><a href="animal.html"><img src="images/me2.jpg" name="Image12" width="224" height="36" border="0" id="Image12" onmouseover="MM_swapImage('Image12','','images/me2.1.jpg',1)" onmouseout="MM_swapImgRestore()" /></a></td>
</tr>
<tr>
<td height="37"><a href="other_activity.html"><img src="images/me3.jpg" name="Image13" width="224" height="37" border="0" id="Image13" onmouseover="MM_swapImage('Image13','','images/me3.1.jpg',1)" onmouseout="MM_swapImgRestore()" /></a></td>
</tr>
<tr>
<td height="32"><a href="school.html"><img src="images/me4.jpg" name="Image14" width="224" height="34" border="0" id="Image14" onmouseover="MM_swapImage('Image14','','images/me4.1.jpg',1)" onmouseout="MM_swapImgRestore()" /></a></td>
</tr>
<tr>
<td height="32"><a href="family.html"><img src="images/me5.jpg" name="Image15" width="224" height="36" border="0" id="Image15" onmouseover="MM_swapImage('Image15','','images/me5.1.jpg',1)" onmouseout="MM_swapImgRestore()" /></a></td>
</tr>
<tr>
<td height="32"><a href="spotlight.html"><img src="images/me6.jpg" name="Image16" width="224" height="37" border="0" id="Image16" onmouseover="MM_swapImage('Image16','','images/me6.1.jpg',1)" onmouseout="MM_swapImgRestore()" /></a></td>
</tr>
<tr>
<td height="34"><a href="download.html"><img src="images/me7.jpg" name="Image17" width="224" height="34" border="0" id="Image17" onmouseover="MM_swapImage('Image17','','images/me7.1.jpg',1)" onmouseout="MM_swapImgRestore()" /></a></td>
</tr>
</table>
<table width="224" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="224" align="center"><br />
<a href="other_under_dance.html"><img src="images/ban_1.gif" width="190" height="90" border="0" /></a></td>
</tr>
<tr>
<td align="center"><a href="other_snorkel.html"><img src="images/ban_2.gif" width="190" height="90" border="0" /></a></td>
</tr>
<tr>
<td height="44" align="center"><a href="other_mascot.html"><img src="images/ban_3.gif" width="190" height="90" border="0" /></a></td>
</tr>
<tr>
<td height="45" align="center"><a href="other_feed.html"><img src="images/ban_4.gif" width="190" height="90" border="0" /></a></td>
</tr>
</table></td>
</tr>
</table></td>
<td width="675" align="center" valign="top" bgcolor="#FFFFFF"><table width="340" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="340" height="655" valign="top"><table width="677" border="0" cellspacing="1" cellpadding="0">
<tr>
<td height="42" colspan="4" align="center"><div align="left">
<h3 class="green-head"><img src="images/but.jpg" width="24" height="25" /> Contact Us </h3>
</div></td>
</tr>
<tr>
<td height="173"><div align="center"></div></td>
<td width="207" height="173"><img src="images/p9.jpg" width="190" height="144" /></td>
<td width="36"> </td>
<td width="338"><img src="images/p10.jpg" width="190" height="144" /></td>
</tr>
<tr>
<td width="91" height="436"><div align="left"></div></td>
<td colspan="3" align="center" valign="top"><div align="left" class="grey-txt-big">
<table width="450" height="298" border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="80" bgcolor="#009999"><strong><span class="style8">To</span></strong></td>
<td width="10"><div align="center">:</div></td>
<td width="352"><label>
<input name="textTo" type="text" id="textTo" value="[email protected]" size="40" />
</label></td>
</tr>
<tr>
<td height="30" bgcolor="#009999"><strong><span class="style8">Subject</span></strong></td>
<td><div align="center">:</div></td>
<td><label>
<input name="textSub" type="text" id="textSub" size="30" />
</label></td>
</tr>
<tr>
<td bgcolor="#009999"><strong><span class="style8">Descrption</span></strong></td>
<td><div align="center">:</div></td>
<td><label>
<textarea name="textDes" cols="50" rows="10" id="textDes"></textarea>
</label></td>
</tr>
<tr>
<td height="30" bgcolor="#009999"><strong><span class="style8">From</span></strong></td>
<td><div align="center">:</div></td>
<td><label>
<input name="textFrom" type="text" id="textFrom" size="30" />
</label></td>
</tr>
<tr>
<td height="29" bgcolor="#009999"><strong><span class="style8">From e-mail </span></strong></td>
<td><div align="center">:</div></td>
<td><label>
<input name="textFemail" type="text" id="textFemail" size="30" />
</label></td>
</tr>
</table>
<table width="62" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="62"><label>
<input type="submit" name="Submit2" value="Submit" />
</label></td>
</tr>
</table>
<br />
<p> </p>
<p><strong>Chiang Mai Zoo Aquarium</strong></p>
<p> Marinescape (Thailand) Co., Ltd.</p>
<p> 100 Huay Kaew Rd, Suthep Sub District,</p>
<p> Muang District, Chiang Mai, Thailand 50200</p>
<p> Tel. +6653 893111, +6653 893013-7</p>
<p> Fax. +6653 892100</p>
<p> </p>
<p> เชียงใหม่ ซู อควาเรียม</p>
<p> บริษัท มารีนสเคป (ประเทศไทย) จำกัด</p>
<p> 100 ถ.ห้วยแก้ว ต.สุเทพ อ.เมือง จ.เชียงใหม่ 50200</p>
<p> โทรศัพท์ (053) 893111, (053) 893013-7</p>
<p> โทรสาร (053) 892100</p>
<p class="grey-txt-big"> </p>
</div></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<div align="left"></div>
<div align="left">
<table width="908" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="908"><div align="center"><br />
..................................................................................................................................................................................................................</div></td>
</tr>
<tr>
<td height="97"><div align="center"><span class="style2 style3 style4"><br />
</span><span class="green-txt "><a href="index.html" class="green-txt"><strong>HOME</strong></a> | <a href="fee.html" class="green-txt"><strong>FEE</strong></a> | <a href="booking.html" class="green-txt"><strong>BOOKING NOW</strong></a> | <a href="dairy_hour.html" class="green-txt"><strong>DAIRY HOUR</strong></a> | <a href="getting.html" class="green-txt"><strong>GETTING HERE</strong></a> | <a href="floor_plan.html" class="green-txt"><strong>FLOOR PLAN</strong></a> | <a href="image_gallery.html" class="green-txt"><strong>IMAGE GALLERY</strong></a> | <a href="job_volunteer.html" class="green-txt"><strong>JOB&VOLUNTEER</strong></a> | <a href="about_us.html" class="green-txt"><strong>ABOUT US</strong></a> | <a href="contact_us.html" class="green-txt"><strong>CONTACT US</strong></a></span> <span class="style4"><br />
<br />
</span>
<p><span class="style4"><span class="grey-txt">MARINESCAPE (THAILAND) CO.,LTD. ALL RIGHT RESERVED.</span><span class="legal"> <a href="http://www.chiangmaiaquarium.com" class="green-txt">WWW.CHIANGMAIAQUARIUM.COM</a><a href="http://www.chiangmaiaquarium.com"><br />
</a></span></span><span class="grey-txt">E-mail :</span><span class="style2"><span class="green-txt"><a href="mailto:[email protected]" class="green-txt">[email protected] <span class="style2"><span class="grey-txt">Website : </span><a href="http://www.chiangmaiaquarium.com" class="green-txt">http//www.chiangmaiaquarium.com</a></span></p>
<br />
<p align="center" class="grey-txt">เชียงใหม่ ซู อควาเรียม 100 ถ.ห้วยแก้ว ต.สุเทพ อ.เมือง จ.เชียงใหม่ 50200 โทร.053-893111, 053-893013-7 แฟกซ์.053-892100</p>
<p align="center" class="grey-txt"> สำนักงานกรุงเทพฯ โทร.02-930-4807-8 แฟกซ์.02-930-4806</p>
<p align="center" class="grey-txt">เปิด 09.00 น. ปิด 18.00 น.</p>
</div></td>
</tr>
<tr>
<td align="center" valign="bottom" bgcolor="#FFFFFF"><img src="images/foot.jpg" width="909" height="284" /></td>
</tr>
</table>
</div></td>
</tr>
</table>
</div></td>
</tr>
</table>
</div>
</body>
</html>
|
|
|
|
|
Date :
2009-05-14 11:15:55 |
By :
เด็กฝึกหัด |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ส่วนหน้านี้เป็นหน้าที่เรา action มา มันมา error ตรงหน้านี้แหละครับ
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Chianmai Zoo Aquarium : contact2</title>
</head>
<body>
<?
$strTo = $_POST["textTo"];
$strSubject = $_POST["textSub"];
$strHeader = "Content-type: text/html; charset=windows-874\n"; // or UTF-8 //
$strHeader .= "From: ".$_POST["textFrom"]."<".$_POST["textFrommail"].">\nReply-To: ".$_POST["textFemail"]."";
$strMessage = nl2br($_POST["textDes"]);
$flgSend = @mail($strTo,$strSubject,$strMessage,$strHeader); // @ = No Show Error //
if($flgSend)
{
echo "Email Sending.";
}
else
{
echo "Email Can Not Send.";
}
?>
</body>
</html>
|
|
|
|
|
Date :
2009-05-14 11:17:02 |
By :
เด็กฝึกหัด |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 05
|