|
|
|
ช่วยดูโค๊ดให้ทีครับ คือว่า ข้อมูลไม่เข้า Database อยากทราบว่าตรงไหนผิดหรือเปล่า นั่นงงนานแล้ว !! |
|
|
|
|
|
|
|
Code (PHP)
<?php
$_POST['Name_School'];
$_POST['Number1'];
$_POST['Moo'];
$_POST['Road'];
$_POST['Dis'];
$_POST['Canton'];
$_POST['Province'];
$_POST['informant'];
$_POST['Phone'];
$_POST['EMail'];
$_POST['service'];
$_POST['detail_service_yes'];
$_POST['detail_service'];
$_POST['use'];
$_POST['timelan'];
$_POST['cou'];
$_POST['Detail'];
?>
<?
$objConnect = mysql_connect("localhost","root","root") or die("Error Connect to Database");
$objDB = mysql_select_db("dbnednet");
mysql_query("SET NAMES UTF8");
$strSQL = "INSERT INTO tb_nednet";
$strSQL .="(Name_school,Number1,Moo,Road,Dis,Canton,Province,informant,Phone,EMail,service, detail_service_yes,detail_service,use,timelan,cou,detail)";
$strSQL .="VALUES ";
$strSQL .="('".$_POST["Name_School"]."','".$_POST["Number1"]."','".$_POST["Moo"]."')";
$strSQL .=",'".$_POST["Road"]."','".$_POST["Dis"]."','".$_POST["Canton"]."') ";
$strSQL .=",'".$_POST["Province"]."','".$_POST["informant"]."','".$_POST["Phone"]."')";
$strSQL .=",'".$_POST["EMail"]."','".$_POST["service"]."','".$_POST["detail_service_yes"]."')";
$strSQL .=",'".$_POST["detail_service"]."','".$_POST["use"]."','".$_POST["timelan"]."')";
$strSQL .=",'".$_POST["cou"]."','".$_POST["Detail"]."') ";
$objQuery = mysql_query($strSQL);
if($objQuery)
{
echo "Save Done.";
}
else
{
echo "Error Save [".$strSQL."]";
}
mysql_close($objConnect);
?>
Tag : PHP
|
|
|
|
|
|
Date :
2013-07-07 12:49:11 |
By :
กิตคุง |
View :
714 |
Reply :
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 01
|