Location: PHPKode > projects > Helpdesk Over Web > how/assets/deleteasset.php
<?php

// Purpose : Deletes an asset record. 

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

// Set the page title and include the HTML header.
$page_title = 'Helpdesk Over Web - Delete Asset Record';
include ('../includes/header.html');

// Connect to Database
require_once ('../includes/mysql_connect.php');
	
echo "<H1>Asset Database</H1>";
echo "<H3>Delete Asset Record</H3>";

$assettodelete = $HTTP_GET_VARS['selectedasset'];
$sql = "DELETE FROM assets WHERE (assettag = '$assettodelete') LIMIT 1;";
$records = range(1, 2);
$result = mysql_query($sql)
   or die("Invalid query: " . mysql_error());
   
echo ("<P>The record for Asset '$assettodelete' has been deleted.</P>");

echo ("<H5>[ <A HREF='assetadmin.php'>Asset Database Administration</A> ]</H5>");

// Include standard HTML footer
include ('../includes/footer.html');
?>

Return current item: Helpdesk Over Web