|
 |
|
รบกวนผู้รู้ครับ Insert ข้อมูล แล้วไม่ขึ้นอะไรเลย หน้าจอว่างเปล่า แก้ไขอย่างไรครับ |
|
 |
|
|
 |
 |
|
โค้ดตามนี้เลยครับ
Code (PHP)
<?
$dateMember = date("Y-m-d");
include ("../phpConnection.php");
$strSQL = "INSERT INTO customer ";
$strSQL .="(cust_id,cust_name,cust_company,cust_address,postcode,email,cust_phone,cust_fax,cust_mobile,member_date,com_type,com_num,cust_user,cust_pass) ";
$strSQL .="VALUES ";
$strSQL .="('0','".$_POST["txtName"]."','".$_POST["txtCompany"]."','".$_POST["txtAddress"]."','".$_POST["txtPostcode"]."','".$_POST["txtEmail"]."','".$_POST["txtPhone"]."' ";
$strSQL .=",'".$_POST["txtFax"]."','".$_POST["txtMobile"]."','".$dateMember."','".$_POST["txtCom_type"]."','".$_POST["txtCom_num"]."','".$_POST["txtUsername"]."','".$_POST["txtPassword"]."') ";
$objQuery = mysql_query($strSQL);
if($objQuery)
{
$strTo = "[email protected]";
$strSubject = "New Register Account";
$strHeader = "Content-type: text/html; charset=windows-874\n"; // or UTF-8 //
$strHeader .= "From: ".$_POST["txtName"]."<".$_POST["txtEmail"].">\nReply-To: ".$_POST["txtFormEmail"]."";
$strMessage = "ได้รับการลงทะเบียนจากคุณ".$_POST["txtName"]."จากบริษัท".$_POST["txtCompany"]."\n โปรดตรวจสอบข้อมูลการรับสมัครได้ที่ : http://www.eqs-trainingcenter.com/";
$flgSend = @mail($strTo,$strSubject,$strMessage,$strHeader); // @ = No Show Error //
if($flgSend)
{
echo "ลงทะเบียนเรียบร้อย";
}
}
else
{
echo "ขอโทษคะ Username หรือ Password นี้มีผู้ใช่แล้ว กรุณา<a href="regist.php" target="_self">ลงทะเบียนใหม่</a>คะ";
}
mysql_close($objConnect);
header('Location:login.php');
?>
Tag : PHP

|
|
 |
 |
 |
 |
Date :
2011-02-08 14:00:37 |
By :
dextiny |
View :
755 |
Reply :
1 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Code (PHP)
$objQuery = mysql_query($strSQL) or die(mysql_error());
ลอง debug ดูน่ะครับ
|
 |
 |
 |
 |
Date :
2011-02-08 16:26:02 |
By :
webmaster |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 04
|