|
 |
|
ช่วยดูให้หน่อยครับ มันไม่ยอม insert ข้อมูลลง database ครับ |
|
 |
|
|
 |
 |
|
<meta charset="utf-8" />
<?php
$host="localhost";
$username="root";
$password="";
$db="system_base";
$connect= mysql_connect( $host,$username,$password) or die ("Fail");
mysql_select_db($db) or die("Fail");
$supname = $_POST['supname'];
$suptax = $_POST['sup_tax_no'];
$address = $_POST['address'];
$att_n = $_POST['att_n'];
$email_sup= $_POST['email_sup'];
$email_att = $_POST['email_att'];
$des = $_POST['des'];
$qty = $_POST['qty'];
$p_u = $_POST['p_u'];
$a_p = $_POST['a_p'];
$weight = $_POST['weight'];
$pack = $_POST['pack'];
$total_w = $_POST['total_w'];
$total_p = $_POST['total_p'];
if(move_uploaded_file($_FILES["fileIN"]["tmp_name"],"myfile/".$_FILES["fileIN"]["name"])&&(move_uploaded_file($_FILES["filePO"]["tmp_name"],"myfile/".$_FILES["filePO"]["name"])&&(move_uploaded_file($_FILES["fileKOK"]["tmp_name"],"myfile/".$_FILES["fileKOK"]["name"]))))
{
$sql = " SELECT * FROM main_base " ;
$sql_in = " insert into main_base (supname , sup_tax_no, address, email_sup , b_invoice , b_po , b_kok , attanlion_name , email_att , date_in , description , qty , price_unit , a_price , weight , packaging , total_weight , total_price) values ('$supname', '$suptax ', '$address', '$email_sup', '".$_FILES["fileIN"]["name"]."' , '".$_FILES["filePO"]["name"]."' , '".$_FILES["fileKOK"]["name"]."','$att_n' , '$email_att' , NOW(), '$des', '$qty', '$a_p', '$weight','$pack','$total_w','$total_p') ";
$sql_q = mysql_db_query($db,$sql_in);
echo "<script language=\"javascript\" type=\"text/javascript\"> alert('Complete') </script>";
} else { echo "<meta http-equiv='refresh' content='0; url=vender.php'>" ;}
?>
ค่าของตัวแปรมานะครับ ไม่ error แต่ทำไมไม่ยอมลงฐานข้อมูล ช่วยดูให้หน่อยครับ      
Tag : PHP

|
ประวัติการแก้ไข 2014-03-12 16:41:24 2014-03-12 16:42:05
|
 |
 |
 |
 |
Date :
2014-03-12 16:40:27 |
By :
Freeland |
View :
634 |
Reply :
1 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
|
|

|
Load balance : Server 02
|