I have the following PHP v.5.6.29
<?php
// Connect to the database
include_once("php_includes/db_connect.php");
error_reporting(E_ALL);
ini_set("display_errors", 1);
// Gather the posted data into local variables
$m = $_POST['MRN'];
$l = $_POST['LastName'];
$f = $_POST['FirstName'];
$s = $_POST['SSN'];
// Get user IP Address
$ip = preg_replace('#[^0-9.]#', '', getenv('REMOTE_ADDR'));
// Form data error handling
if($m == "" || $l == "" || $f == "" || $s == ""){
echo "The form submission is missing data.";
} else {
// End form data error handling
$sql = "INSERT INTO nys_demographics (mrn, pt_last_name, pt_first_name, pt_ssn, ip_address, record_insert_dtime)
VALUES('$m', '$l','$f','$s','$ip',now()";
mysqli_query($db_connect, $sql);
echo "insert success";
}
header("refresh:3; url=demographics.php");
?>
I get the success message but then there is nothing in the db table. Not sure what to do from here.