include ('../config.php'); if (isset($_POST['submit'])) { $fullName =$_POST['fullName']; $email = $_POST['email']; $mobile = $_POST['mobile']; $dob = $_POST['dob']; $ddlType = $_POST['ddlType']; $pincode = $_POST['pincode']; $address = $_POST['address']; $ddlState = $_POST['ddlState']; $query = $_POST['query']; // // $from = new DateTime($dob); // $to = new DateTime('today'); // echo "age = ".$from->diff($to)->y; // // echo $insertQuery = "INSERT INTO `customerdetail`( fullName, email, dob, mobile, address, state, pincode, InsurenceType, query) VALUES ('$fullName','$email',$dob,$mobile,'$address','$ddlState',$pincode,'$ddlType', '$query')"; $insertCmd = $CS->query($insertQuery); print_r($insertCmd); if(!$insertCmd){ echo 'data is not submited'; } else { echo 'data is submited'; } }
INSERT INTO MyTable (NameOfMyColumn1, NameOfMyColum2) VALUES (ValueForMyColumn1, ValueForMyColumn2)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)