Location: PHPKode > projects > PHPmyEXIM > catchall_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 = "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 alias from $tabelle where mbox_name = '@' and domain_name = '$domain'");
$row1 = mysql_fetch_row($result1);
if ($row1[0] != "")
{
$result=MYSQL_QUERY("DELETE FROM $tabelle where domain_name = '$domain' and mbox_name = '@'");
echo"
<p>Your catch-all-account (<i>$row1[0]</i>) has been deleted successfully.<p><p><a href=\"main.php?domain=$domain\" target=\"main\"><img src=\"images/home.gif\" border=\"0\"></a></p>
";
}
else
{
echo"
<p>Your catch-all-account has not been deleted. There is no catch-all-account.<p><p><a href=\"javascript:history.back()\" target=\"main\"><img src=\"images/back.gif\" border=\"0\"></a></p>
";
}
?>
</body>
</html>

Return current item: PHPmyEXIM