added appointments-encounters report
[openemr.git] / contrib / forms / habits / save.php
blob03b55bae949eb67fbf203c735c677972c27a44d7
1 <?
2 # file habits/save.php
3 # saves what cames from habits/new.php
5 include_once("../../globals.php");
6 include_once("$srcdir/api.inc");
7 include_once("$srcdir/forms.inc");
8 formHeader('Habits form submitted');
10 $_POST["smoke_quit"]=dateToDB ($_POST["smoke_quit"]);
12 $id = formSubmit('form_habits', $_POST);
14 //this function adds the form to a table wich creates a registry
15 //don't forget to add it in your save.php file.
16 // then it may be retrievable by the report menu
17 if ($encounter == "")
18 $encounter = date("Ymd");
19 $newid=mysql_insert_id($GLOBALS['dbh']); // last id
20 addForm($encounter, "Habits", $newid, "habits", $pid, $userauthorized);
24 formJump("./print.php?id=$id");
26 formFooter();