'; // print_r($_POST); // die(); $driver_name = $_POST['driver_name']; $mobile_no = $_POST['mobile_no']; $aadhar_no = $_POST['aadhar_no']; $pan_no = $_POST['pan_no']; $dl_no = $_POST['dl_no']; $dl_exp_date = $_POST['dl_exp_date']; $created_at = date('Y-m-d H:i:s'); $stmt = $conn->prepare("INSERT INTO `driver_master` (`driver_name`, `mobile_no`, `aadhar_no`, `pan_no`, `dl_no`, `dl_exp_date`, `created_at`) VALUES (?, ?, ?, ?, ?, ?, ?)"); if ($stmt) { // Bind parameters: s = string, s = string, s = string $stmt->bind_param("sssssss", $driver_name, $mobile_no, $aadhar_no, $pan_no, $dl_no, $dl_exp_date, $created_at); // Execute the statement if ($stmt->execute()) { echo ""; // Optionally redirect or clear form here } else { echo "Error executing query: " . $stmt->error; } $stmt->close(); } else { echo "Failed to prepare statement: " . $conn->error; } } require_once('includes/header.php'); ?>