|
 |
|
ช่วยดูโค๊ตให้หน่อยครับ รันบน localhost ปกติ แต่พออัพขึ้น server ค่าไม่ส่งครับ |
|
 |
|
|
 |
 |
|
น่าจะเป็นตรงนี้นะลองดูครับ
Code (PHP)
if($_POST["Action"] == "Progress")
|
 |
 |
 |
 |
Date :
2012-08-23 05:47:47 |
By :
000su000 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
คุ้น ๆ ว่าเคยเขียนให้เป็นตัวอย่างแล้วน่ะครับ คุณจะต้องทำความเข้าใจกับมันให้ท่องแท้ก้อนครับ
|
 |
 |
 |
 |
Date :
2012-08-23 06:16:10 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ใช่ครับพี่อันนี้ตัวอย่างเก่าที่พี่เขียนให้ครับ
Code (PHP)
<html>
<head>
<title>ThaiCreate.Com Tutorial</title>
</head>
<body>
<form action="<?=$_SERVER["PHP_SELF"];?>?Action=Progress" method="post" name="form1">
<?
if($_GET["Action"] == "Progress")
{
if($_POST["txtSiteName"] == "")
{
echo "<font color=red>Input SuteName</font>";
}
}
?>
<table border="1">
<tr>
<td>
<?if($_POST["txtSiteName"] != "")
{
?>
<?=$_POST["txtSiteName"];?>
<?
}
else
{
?>
<input type="text" name="txtSiteName">
<?
}
?>
</td>
<td>
<input name="btnSubmit" type="submit" value="Submit">
</td>
</tr>
</table>
</form>
</body>
</html>
ผมก็นำมาประยุกต์ใช้แแล้วนะครับ แต่มันติดที่ว่าผมกำลังจะเพิ่มการส่งเมลเข้าไปในกระบวนการสุดท้าย เลยลองเอคโค่ค่าไปหน้าอื่นดูก่อนว่ามันส่งค่าไปจริงหรือเปล่า ปรากฏว่ามันส่งไปได้ครับใน local แต่พอผมอัพเข้าเซิฟ ไฟล์เดียวกันนะครับ แต่หน้าที่ผมเอคโค่ค่าออกมามันไม่ออกนะครับ เลยแปลกใจว่าทำไมรันในคอมติดแต่อัพเข้าเซิฟไม่ติดครับ เพราะผมต้องเอาค่าที่กรอกไปส่งเข้าเมลอะครับ
|
 |
 |
 |
 |
Date :
2012-08-23 06:26:09 |
By :
postinor4you |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ออกแล้วคร๊าบบบแก้เป็นแบบนี้
send
Code (PHP)
<!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=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<?
if($_POST['kanji'] == "")
{
?>
<form name="form1" method="post" action="<?php echo $_SERVER["PHP_SELF"];?>?Action=Progress">
<?php
if($_GET["Action"] == "Progress")
{
if(!$_POST["kanji"] )
{
echo "<font color=red>Insert your kanji name!</font><br>";
}
}
?>
<table cellspacing="0" cellpadding="0" border="1" summary="お問い合わせ" class="tblcon">
<tbody><tr>
<th width="35%">お名前<font color="#FF0000">*</font></th>
<td><input name="kanji" type="text" class="textfield-form" id="kanji" ><br><strong>例)山田 太郎</strong></td>
</table>
<input type="submit" name="submit">
</form>
<?
}
elseif($_POST['kanji'] != "")
{
?>
<form name="form1" method="post" action="receive.php">
<table cellspacing="0" cellpadding="0" border="1" summary="お問い合わせ" class="tblcon">
<tbody><tr>
<th width="35%">お名前<font color="#FF0000">*</font></th>
<td><?=$_POST['kanji']?><input name="kanji" type="hidden" value="<?=$_POST['kanji']?>" /></td>
</table>
<input type="submit" name="button">
</form>
<? } ?>
</body>
</html>
receive.php
Code (PHP)
<?php
echo $kanji=$_REQUEST['kanji'];
?>
<?/*
mail($strTo,$strSubject,$strMessage,$strHeader);
?>
<?
$strTo = "[email protected]";
$strSubject = "Test Send Email";
$strHeader = "From: [email protected]";
$strMessage = "My name is"."<br>".$kanji;
$flgSend = mail($strTo,$strSubject,$strMessage,$strHeader); // @ = No Show Error //
if($flgSend)
{
echo "Email Sending.";
}
else
{
echo "Email Can Not Send.";
}*/
?>
|
 |
 |
 |
 |
Date :
2012-08-23 09:11:03 |
By :
postinor4you |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 00
|