Location: PHPKode > projects > PHPmyEXIM > domain_delete.php
<?php
require("session.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
	<title></title>
	<link rel=stylesheet type="text/css" href="global.css">
</head>
<body>
<?php
if (isset($_GET['domain']))
{
	$domain = $_GET['domain'];
}
else
{
	$domain = "";
}

require("config.php");
$tabelle = "domains";
$tabelle1 = "mail_users";

/* Connection to the Database */ 
MYSQL_CONNECT($server, $user, $passw) or die ( "<H3>unable to connect to database server</H3>");
MYSQL_SELECT_DB($datenbank) or die ( "<H3>database does not exist</H3>");

$result1=MYSQL_QUERY("select domain_name from $tabelle where domain_name = '$domain'");
$row1 = mysql_fetch_row($result1);
if ($row1[0] != "")
{
$result=MYSQL_QUERY("DELETE FROM $tabelle where domain_name = '$domain'");
$del_mails=mysql_query("DELETE FROM $tabelle1 where domain_name = '$domain'");
echo"
<p>The domain (<i>$row1[0]</i>) and all its eMail-accounts have been deleted successfully.<p><p><a href=\"domain_overview.php\"><img src=\"images/back.gif\" border=\"0\"></a></p>
";
}
else
{
echo"
<p>Your domain has not been deleted. There is no domain.<p><p><a href=\"domain_overview.php\"><img src=\"images/back.gif\" border=\"0\"></a></p>
";
}
?>
</body>
</html>

Return current item: PHPmyEXIM