Location: PHPKode > projects > Helpdesk Over Web > how/assets/editrecord-process.php
<?php
// Processes changes to asset database entries.

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

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

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

// Retrieve values from form and assign to variables. 
$assettag = $_POST['assettag'];
$category = $_POST['category'];
$manufacturer = $_POST['manufacturer'];
$model = $_POST['model'];
$purchasedate = $_POST['purchasedate'];
$installdate = $_POST['installdate'];
$user = $_POST['user'];
$spec = $_POST['spec'];
$remarks = $_POST['remarks'];

// Execute SQL query.
$sql = "REPLACE INTO assets (AssetTag, Category, Manufacturer, Model, PurchaseDate, InstallDate, User, Specification, Remarks) VALUES ('$assettag', '$category', '$manufacturer', '$model', '$purchasedate', '$installdate', '$user', '$spec', '$remarks')";
$result = mysql_query($sql)
   or die("Invalid query: " . mysql_error());

// Echo text to screen.
echo "<H3>Asset Database Record Updated</H3>";
echo "<P>The record for Asset $assettag ($manufacturer $model) has been updated.</P>";
echo "<H5>[ <A HREF='assetadmin.php'>Asset Database Administration</A> ]</H5>";

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