several more TYPE->ENGINE conversions for mysql 5.5 compliance
[openemr.git] / contrib / forms / pain / save.php
blob1d37506ee152f80ebb264f29419ff4142b14f8d4
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_pain", $_POST, $_GET["id"], $userauthorized);
14 addForm($encounter, "Pain Evaluation", $newid, "pain", $pid, $userauthorized);
15 }elseif ($_GET["mode"] == "update") {
16 sqlInsert("update form_pain set pid = {$_SESSION["pid"]},groupname='".$_SESSION["authProvider"]."',user='".$_SESSION["authUser"]."',authorized=$userauthorized,activity=1, date = NOW(), history_of_pain='".$_POST["history_of_pain"]."', dull='".$_POST["dull"]."', colicky='".$_POST["colicky"]."', sharp='".$_POST["sharp"]."', duration_of_pain='".$_POST["duration_of_pain"]."', pain_referred_to_other_sites='".$_POST["pain_referred_to_other_sites"]."', what_relieves_pain='".$_POST["what_relieves_pain"]."', what_makes_pain_worse='".$_POST["what_makes_pain_worse"]."', accompanying_symptoms_vomitting='".$_POST["accompanying_symptoms_vomitting"]."', accompanying_symptoms_nausea='".$_POST["accompanying_symptoms_nausea"]."', accompanying_symptoms_headache='".$_POST["accompanying_symptoms_headache"]."', accompanying_symptoms_other='".$_POST["accompanying_symptoms_other"]."', additional_notes='".$_POST["additional_notes"]."' where id=$id");
18 $_SESSION["encounter"] = $encounter;
19 formHeader("Redirecting....");
20 formJump();
21 formFooter();