4 include_once("../../globals.php");
5 include_once("$srcdir/api.inc");
6 include_once("$srcdir/forms.inc");
7 formHeader('Lab Results');
9 //main check to be sure it was finely called.
10 if ($_POST["action"]!="submit" ) {
11 die ("You should send the info from the form.");
14 //echo ("debug passed if<br>");
16 # we are not using the standard function
17 # because of the file being uploaded.
18 // if succesfull we keep going with the form input to the table
20 $notes=addslashes (trim ($_POST['notes']) );
22 $now=date ("Y-m-d H:h:s");
24 $sql = "INSERT INTO `form_lab_results` SET
25 pid = {$_SESSION['pid']},
26 groupname='".$_SESSION['authProvider']."',
27 user='".$_SESSION['authUser']."',
28 authorized=$userauthorized,
34 $result= sqlQuery ($sql); //query passed to db
37 //this function adds the form to a table wich creates a registry
38 // then it may be retrievable by the report menu
40 $encounter = date("Ymd");
41 $newid=mysql_insert_id($GLOBALS['dbh']); // last id
42 addForm($encounter, "Lab Results", $newid, "lab_results", $pid, $userauthorized);
45 // i don't get where this id cames from
46 // formJump("./print.php?id=$id");
47 formJump("./print.php?id=$newid");