*/ // include db handler require_once 'include/DB_update.php'; if (empty($_POST["phone"]) or empty($_POST["problem"])) { echo "\n"; } else { $db = new DB_update(); $med1 = ""; $med2 = ""; $med3 = ""; $med4 = ""; if (!empty($_POST["drug1"])) { $med1 = $_POST["drug1"] . "#" . $_POST["time1"] . "#" . $_POST["days1"]; } if (!empty($_POST["drug2"])) { $med2 = $_POST["drug2"] . "#" . $_POST["time2"] . "#" . $_POST["days2"]; } if (!empty($_POST["drug3"])) { $med3 = $_POST["drug3"] . "#" . $_POST["time3"] . "#" . $_POST["days3"]; } if (!empty($_POST["drug4"])) { $med4 = $_POST["drug4"] . "#" . $_POST["time4"] . "#" . $_POST["days4"]; } $result = $db->store_record($_POST["phone"], $_POST["problem"], $_POST["diagnosis"], $_POST["doctor"], $_POST["reports"], $_POST["nextappointment"], $med1, $med2, $med3, $med4); if ($result == false) { echo "Error in saving the user details"; } else { echo $result; } } // UPDATE `medpil`.`patient_info` SET `phone` = '9489244684' WHERE `patient_info`.`phone` =2147483647;