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

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

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

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

// Retrieve form variables.
$callid = $_POST['callid'];
$date = $_POST['date'];
$time = $_POST['time'];
$user = $_POST['user'];
$asset = $_POST['asset'];
$fault = $_POST['fault'];
$worklog = $_POST['worklog'];
$severity = $_POST['severity'];
$callstatus = $_POST['callstatus'];
$category = $_POST['category'];
$engineer = $_POST['engineer'];

$sql = "UPDATE calls SET fault='$fault', worklog='$worklog', callstatus='$callstatus', category='$category', engineer='$engineer', severity='$severity' WHERE callid='$callid';";
// $sql = "REPLACE 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>Call Details Updated.</H3>";
echo "<P>Entry for <b>$callid</b> updated.";

// Include HTML footer.
include_once('../includes/footer.html');
?>
Return current item: Helpdesk Over Web