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
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");