<?php /*** * fadd.php - followup add * * Created by Scott Sakai (ssakai@sdsc.edu) * * March 2008 ***/ require_once "irtauth.php"; require_once "irtdb.php"; // connect to the database $irtdb = new irtdb(); // get incident detail $i = $irtdb->getIncident($_REQUEST['i']); // no detail? someone is messing with us. if (empty($i)) { die("Bad incident id"); } // process form info, if any $errors = ''; $n = array(); if (isset($_POST['submit'])) { // type (manditory) if (!isset($_POST['type']) || trim($_POST['type']) == '') { $errors .= "\"Type of follow-up\" is a manditory field<br>"; } else { $n['type'] = trim($_POST['type']); } // body (manditory) if (!isset($_POST['body']) || trim($_POST['body']) == '') {