|  |  | 
          
            | คือผมต้องการ SAVE ข้อมูลลงฐานข้อมูล2ฐานข้อมูลแยกกันทำได้หรือเล่าครับ โค้ดของผมมันSAVE ได้แต่ส่วนแรกแต่ส่วนที่2มันไม่เข้าฐานข้อมูลนะครับ
 Code (JavaScript)
 
 
<link href="css/ jQuery Validation Plugin.css" rel="stylesheet" type="text/css" />
<div class="container">
<div class="span">
<?php
	include 'Connection/ConnectDB.php';
	
	if($_GET['Number_order'] == "" ){ // is submit
		
		$strSQL = "INSERT INTO production_order ";
		$strSQL .="(production_Order_ID,Number_order,number,Customer,txtdate1,project_Name,txtdate2,Delivery_place,Production_facility) ";
		$strSQL .="VALUES ";
		$strSQL .="('".$_POST[""]."','".$_POST["txtquotation"]."','".$_POST["txtno"]."' ";
		$strSQL .=",'".$_POST["txtcustomer"]."','".$_POST["txtdate1"]."','".$_POST["txtproject"]."','".$_POST["txtdate2"]."' ";
		$strSQL .=",'".$_POST["txtsend"]."','".$_POST["txtproduction"]."') ";
		
		$objQuery = mysql_query($strSQL);
		$error = mysql_error();
	
		if(!$error){
			$hiddenlin = $_POST['hidden'];
				for($z=1;$z<=$hiddenlin;$z++){
					$strSQL = "INSERT INTO product_features ";
					$strSQL .="(id,NO,select_production,totallinel,Product_Color,thickness1,thickness2,thickness3,thickness4,length1,length2,length3,length4,piece1,piece2,piece3,piece4,weight1,weight2,weight3,weight4,weight5,weight6) ";
					$strSQL .="VALUES";
					$strSQL .="('".$_POST[""]."','".$_POST["NO"]."','".$_POST["select_production".$z]."','".$_POST["totallinel".$z]."','".$_POST["Product_Color"]."', ";
					$strSQL .="'".$_POST["thickness1"]."','".$_POST["thickness2"]."','".$_POST["thickness3"]."','".$_POST["thickness4"]."', ";
					$strSQL .="'".$_POST["length1"]."','".$_POST["length2"]."','".$_POST["length3"]."','".$_POST["length4"]."',";
					$strSQL .="'".$_POST["piece1"]."','".$_POST["piece2"]."','".$_POST["piece3"]."','".$_POST["piece4"]."', ";
					$strSQL .="'".$_POST["weight".$z."_1"]."','".$_POST["weight".$z."_2"]."','".$_POST["weight".$z."_3"]."','".$_POST["weight".$z."_4"]."','".$_POST["weight".$z."_5"]."','".$_POST["weight".$z."_6"]."') ";
					$objQuery = mysql_query($strSQL);
					$error = mysql_error();
			}
			header("location:a.php");
			}else{
						echo "<script type='text/javascript'>alert('เกิดข้อผิดพลาดกรุณาติดต่อผู้ดูแลระบบ');</script>";
					}
			}else{
				
				$strSQL = "SELECT * FROM production_order WHERE Number_order = '".$_GET['Number_order']."' ";
				$objQuery = mysql_query($strSQL);
				$Num_Rows = mysql_num_rows($objQuery);
				$error = mysql_error();
					if($Num_Rows == 0){
						echo "true";
					}else{
						echo "false";
					}
			}
mysql_close($objConnect);
?>
</div>
</div>
 
 
 Tag : PHP
 
 
 |  
            |  |  
            | 
              
                |  |  |  |  
                |  | 
                    
                      | Date :
                          2015-07-16 14:54:36 | By :
                          chaiyan14731 | View :
                          688 | Reply :
                          3 |  |  |  
                |  |  |  |  |  
            |  |  
		            |  |