Location: PHPKode > projects > Helpdesk Over Web > how/sysmgmt/deleteuser.php
<?php

// Purpose : Deletes a system user account. 

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

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

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

$usertodelete = $HTTP_GET_VARS['selecteduser'];
$sql = "DELETE FROM systemusers WHERE (HOWLogin = '$usertodelete') LIMIT 1;";
$records = range(1, 500);
$result = mysql_query($sql)
   or die("Invalid query: " . mysql_error());
   
echo ("<P>The record for User '$usertodelete' has been deleted.</P>");

echo ("<H4>[ <A HREF='sysusers.php'>Main User Management Screen</A> ]</H4>");

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

Return current item: Helpdesk Over Web