
<p>
CustomerDelete Table:<br />
<form action="customerdelete.php" method="post">
LastName:<br />
<input type="varchar" name="LastName" size="10" maxlength="32" value="" /><br />
<input type="submit" value="Search!" />
</form>
</p>

<?php

if (isset($_POST['LastName']))
{

	$linkID = mysql_connect("localhost","root","ktm250") or die("No connection");
	mysql_select_db("newstore") or die("No connection");

	$LastName = mysql_real_escape_string($_POST['LastName']);

	//$CustomerID = $FirstName ."".$MiddleInitial ."".$LastName;
	//$CustomerID = md5($CustomerID);

	$query = "DELETE FROM customer WHERE LastName = '$LastName'";

	$result = mysql_query($query);

	//echo "CustomerID: $CustomerID <br>";
	//echo "FirstName: $FirstName <br>";
	//echo "MiddleInitial: $MiddleInitial <br>";
	//echo "LastName: $LastName <br>";
	//echo "Gender: $Gender <br>";
	//echo "Address: $Address <br>";
	//echo "Address2: $Address2 <br>";
	//echo "City: $City <br>";
	//echo "State: $State <br>";
	//echo "ZipCode: $ZipCode <br>";
	//echo "PhoneNumber: $PhoneNumber <br>";
	//echo "<br>";

	mysql_close();
}

?>

<a href="index.html">Return to main...</a>
