Good evening - I practically know nothing of PHP - only what I have learned from troubleshooting Dreamweaver errors. I have come to a dead end. I am trying to submit a form that captures information about a Dr's Appt, but allows the date to be formatted m/d/Y. forgive me if I post too much code, I'd rather post more than less. Thank you for your help.
$editFormAction = $SERVER['PHP_SELF'];
if (isset($SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($POST["MM_insert"])) && ($POST["MM_insert"] == "form1")) {
$SQL = sprintf("INSERT INTO AppointmentInformation (VisitID, PhysicianSeenCodeID, UniqueID, DateOfVisit, IsFirstVisit, BillingCode1TypeCodeID, BillingCode1, BillingCode2TypeCodeID, BillingCode2, BillingCode3TypeCodeID, BillingCode3, BillingCode4TypeCodeID, BillingCode4, HasElectro) VALUES (%s, %s, %s, str_to_date(%s, '%%m/%%d/%%Y'), %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($POST['VisitID'], "int"),
GetSQLValueString($POST['PhysicianSeenCodeID'], "int"),
GetSQLValueString($POST['UniqueID'], "int"),
GetSQLValueString($POST['DateOfVisit'], "date"),
GetSQLValueString(isset($POST['IsFirstVisit']) ? "true" : "", "defined","1","0"),
GetSQLValueString($POST['BillingCode1TypeCodeID'], "int"),
GetSQLValueString($POST['BillingCode1'], "text"),
GetSQLValueString($POST['BillingCode2TypeCodeID'], "int"),
GetSQLValueString($POST['BillingCode2'], "text"),
GetSQLValueString($POST['BillingCode3TypeCodeID'], "int"),
GetSQLValueString($POST['BillingCode3'], "text"),
GetSQLValueString($POST['BillingCode4TypeCodeID'], "int"),
GetSQLValueString($POST['BillingCode4'], "text"),
GetSQLValueString(isset($POST['HasElectro']) ? "true" : "", "defined","1","0"));
mysql_select_db($database_EAS, $EAS);
$Result1 = mysql_query($insertSQL, $EAS) or die(mysql_error());
}