Location: PHPKode > projects > Helpdesk Over Web > how/calls/newcall-process.php
<?php
// Processes new call entry.

// Include Configuration File
require_once('../includes/config.inc');

// Set Page Title and Include HTML Header
$page_title = 'HOW - New Call Logged';
include_once('../includes/header.html');

// Connect to Database
require_once ('../includes/mysql_connect.php');

$date = $_POST['date'];
$time = $_POST['time'];
$user = $_POST['user'];
$asset = $_POST['asset'];
$category = $_POST['category'];
$fault = $_POST['fault'];
$worklog = $_POST['worklog'];
$severity = $_POST['severity'];
$engineer = $_POST['engineer'];

$dateforcallid = date("dm");
$timeforcallid = date("His");

$callid = "C" ."".	$dateforcallid . "" .  $timeforcallid;

$sql = "INSERT INTO calls(callid, date, time, user, asset, fault, worklog, severity, category, callstatus, engineer) VALUES ('$callid', '$date', '$time', '$user', '$asset', '$fault', '$worklog', '$severity', '$category', '$callstatus', '$engineer')";
$result = mysql_query($sql)
   or die("Invalid query: " . mysql_error());

echo "<H3>New Call Added</H3>";
echo "<P>Entry for <b>$callid</b> created.";
// Include HTML footer.
include_once('../includes/footer.html');
?>
Return current item: Helpdesk Over Web