Form_id assigning "0"....hel

crmrto wrote on Friday, November 23, 2012:

Hi,

I have a custom form that is not assigning a form_id number instead it assings “0” and nothing gets recorder, this is mt save.php file, can someone please give me a hand with this?

thanks in advanced guys

<?php
include_once("…/…/globals.php");
include_once("$srcdir/api.inc");
include_once("$srcdir/forms.inc");

$prov = $_SESSION;
$enc = $_SESSION;
$pid = $_SESSION;
$date = date(‘Y/m/d h:i:s a’);
$fr = $_POST;
$fc = $_POST;
$tas = $_POST;
$tad = $_POST;
$temp = $_POST;
$gluc = $_POST;
$sat = $_POST;
$pad = $_POST;
$ant = $_POST;
$exp = $_POST;
$grupo = $_POST;
$code = $_POST;
$diag = $_POST;
$man = $_POST;
$act = “1”;
$table_name = “form_notaC”;

if ($encounter == “”) $encounter = date(“Ymd”);

mysql_query(“INSERT INTO form_notaC  (pid,date,provider,encounter,fr,fc,tas,tad,temp,gluc,sat,padecimiento,antecedentes,exploracion,code,grupo1,diagnostico,manejo,activity)
VALUES (’$pid’, ‘$date’,’$prov’, ‘$enc’, ‘$fr’,’$fc’,’$tas’,’$tad’,’$temp’,’$gluc’,’$sat’,’$pad’,’$ant’,’$exp’,’$code’,’$grupo’,’$diag’,’$man’,’$act’)”);
$id = mysql_insert_id();
addForm($encounter, “Nota de Consulta”, $id, “notaC”, $pid, $userauthorized);

formHeader(“Redirecting….”);
formJump();
?>