update
[openemr.git] / interface / forms / CAMOS / save.php
blob82531f5a0c19f51c0ca88388414a54fbfaa14b73
1 <?php
2 //------------This file inserts your field data into the MySQL database
3 include_once("../../globals.php");
4 include_once("../../../library/api.inc");
5 include_once("../../../library/forms.inc");
6 include_once("../../../library/sql.inc");
8 if ($_GET["mode"] == "delete") {
9 foreach($_POST as $key => $val) {
10 if (substr($key,0,3) == 'ch_' and $val='on') {
11 $id = substr($key,3);
12 if ($_POST['delete']) {
13 sqlInsert("delete from form_CAMOS where id=$id");
14 sqlInsert("delete from forms where form_name like 'CAMOS%' and form_id=$id");
16 if ($_POST['update']) {
17 sqlInsert("update form_CAMOS set content='".$_POST['textarea_'.$id]."' where id=$id");
23 $_SESSION["encounter"] = $encounter;
24 formHeader("Redirecting....");
25 formJump();
26 formFooter();