 |
|
Code (PHP)
$strSQL = "INSERT INTO customer ";
$strSQL .="(CustomerID,Name,Email,CountryCode,Budget,Used) ";
$strSQL .="VALUES ";
$strSQL .="(NULL,'".$_POST["txtName"]."','".$_POST["txtEmail"]."' ";
$strSQL .=",'".$_POST["txtCountryCode"]."','".$_POST["txtBudget"]."','".$_POST["txtUsed"]."') ";
$objQuery = mysql_query($strSQL);
$CustomerID = mysql_insert_id(); // กรณีที่เป็นค่า auto increment
$strSQL = "INSERT INTO details ";
$strSQL .="(DetailID,CustomerID,Details) ";
$strSQL .="VALUES ";
$strSQL .="(NULL,'".$CustomerID."','".$_POST["Details"]."') ";
$objQuery = mysql_query($strSQL);
|
 |
 |
 |
 |
Date :
2012-03-13 06:21:37 |
By :
webmaster |
|
 |
 |
 |
 |
|
|
 |