stop reporting of a custom error (it is benign) to the php logfile
[openemr.git] / contrib / forms / contacts / save.php
blob929626ebd18680344b645cf8fb251e143ba408b2
1 <?php
2 //------------Forms generated from formsWiz
3 include_once("../../globals.php");
4 include_once("$srcdir/api.inc");
5 include_once("$srcdir/forms.inc");
6 foreach ($_POST as $k => $var) {
7 $_POST[$k] = mysql_escape_string($var);
8 echo "$var\n";
10 if ($encounter == "")
11 $encounter = date("Ymd");
12 if ($_GET["mode"] == "new"){
13 $newid = formSubmit("form_contacts", $_POST, $_GET["id"], $userauthorized);
14 addForm($encounter, "Contacts", $newid, "contacts", $pid, $userauthorized);
15 }elseif ($_GET["mode"] == "update") {
16 sqlInsert("update form_contacts set pid = {$_SESSION["pid"]},groupname='".$_SESSION["authProvider"]."',user='".$_SESSION["authUser"]."',authorized=$userauthorized,activity=1, date = NOW(), od_base_curve='".$_POST["od_base_curve"]."', od_sphere='".$_POST["od_sphere"]."', od_cylinder='".$_POST["od_cylinder"]."', od_axis='".$_POST["od_axis"]."', od_diameter='".$_POST["od_diameter"]."', os_base_curve='".$_POST["os_base_curve"]."', os_sphere='".$_POST["os_sphere"]."', os_cylinder='".$_POST["os_cylinder"]."', os_axis='".$_POST["os_axis"]."', os_diameter='".$_POST["os_diameter"]."', material='".$_POST["material"]."', color='".$_POST["color"]."', bifocal_type='".$_POST["bifocal_type"]."', add_value='".$_POST["add_value"]."', va_far='".$_POST["va_far"]."', va_near='".$_POST["va_near"]."', additional_notes='".$_POST["additional_notes"]."' where id=$id");
18 $_SESSION["encounter"] = $encounter;
19 formHeader("Redirecting....");
20 formJump();
21 formFooter();