<html><head><title>128 Concepts EZ Shopper - Delete SETTING Table</title></head>
<body>
<?php
/***************************************************************************
 *			del_user.php	                                   *
 *                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~	                   *
 *   File Info:		  Delete User                                      *
 *   Copyright:       Copyright 2003 http://www.128concepts.com            *
 *						                           *
 ***************************************************************************/
include("./config.php");
include("./header.inc");
?>
if ($_SERVER['REQUEST_METHOD'] == "POST") 
  {
        # escape data and set variables
        $username = addslashes($_POST["username"]);
}
$table = "users";
$conn = @mysql_connect($server,$user,$password) 
   or die("Sorry - could not connect to MySQL");

$rs = @mysql_select_db($database,$conn) 
	or die("Unable to select the database...Please press 'Create Database' to create new database.");
if ($username == "admin")
{
	echo "<br><center><img src=images/line.gif border=0 width=470 height=1><br><img src=images/trash1.gif border=0><font face=verdana size=2>  You cannot delete the administrator's user record from database!</font><br><img src=images/line.gif border=0 width=470 height=1><br><br>";
	include_once("./your-footer.inc");
	exit();
}
$sql = " DELETE from $table where username = '$username'";
$rs = mysql_query($sql,$conn)
	or die("Could not execute SQL query!!! Possibly SQL query already been executed.");
echo"
<br><center><img src=images/line.gif border=0 width=470 height=1><br><font face=verdana size=2>The User Account for user '$username' has been deleted.<br>To create a new user account, click <a href = ./newpass.php><font face=verdana size=2 color=navy>Create New User.</font></a></font><br><img src=images/line.gif border=0 width=470 height=1></center><br><br>";
include("./your-footer.inc");
?>
</body>
</html>