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

// Purpose : Deletes a user record. 

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

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

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

$usertodelete = $HTTP_GET_VARS['selecteduser'];
$sql = "DELETE FROM users WHERE (UserID = '$usertodelete') LIMIT 1;";
$records = range(1, 2);
$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='/how/index.php'>Main Menu</A> ]</H4>");

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

Return current item: Helpdesk Over Web