Location: PHPKode > scripts > Create Your Own Directory > cms/admin/DBMAD/mailman/deletegroup.php
<?php
//include "../../authheader.php";

if($block != true)
{
?>

<?php

$groupn = $_POST['delgroup'];
$delmess = $_POST['delmess'];
include 'header.txt';

//$link = mysql_connect($hostn, $usern,$passn);
if (!$link) {
   die('Could not connect: ' . mysql_error());
}

mysql_select_db($dbname,$link);

?>

<html>
<head>

<!-- Welcome to the scripts database of HIOX INDIA      -->
<!-- This tool is developed and a copyright             -->
<!-- product of HIOX INDIA.				        -->
<!-- For more information visit http://www.hscripts.com -->

<style>
.cent{ TEXT-DECORATION: none; font-family: san-serif; font-weight: 600; color: #ffffff; font-size: 17px; height: 22px;}
.cent:hover{TEXT-DECORATION: none; color: #000000;}
</style>
</head>


</td></tr>

<tr height=90% width=100% bgcolor="#0f7f0f">
<td width=100%>
<div style="height: 100%;">
<table width=100% height=100%  align=center border=0>
<tr height=100%>
<?php 
if($groupn != "" && $groupn != null && $delmess != "" && $delmess != null)
{
//print_r($str);
$qers = "delete from mailid where groupn like '$groupn'";
$qer1 = "delete from groupname where name like '$groupn'";
$result = mysql_query($qers,$link);
$result1 = mysql_query($qer1,$link);
if($result && $result1)
{
echo("<td><div align=center style=\"color: #9a9a9a;\">Deleted</div>");
echo "<div align=center> $groupn </div>";
echo "</td>";
}
else
{
echo("<td><div align=center style=\"color: #9a9a9a;\">Not-Deleted</div>");
echo "</td>";
}

}
?>

<td width=60% style="border: 2px #47a985 solid;"  bgcolor="#efffef">
<table align=center width=80% style="color: #888888; font-weight: bold; padding-left: 10%;">
<form name=delf method=post action="deletegroup.php">
<tr><td valign=top>Existing Groups</td><td>
<?php
$qer = "select * from groupname";
//echo($qer);
$result = mysql_query($qer,$link);
echo "<select name=delgroup>";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) 
{
	foreach ($line as $col_value) 
	{
		if($col_value != "")
			echo "<option>$col_value</option>";
	}
}
echo "</select>";
?>
</td></tr>

<tr><td valign=top>&nbsp;</td><td><br><br>
Copy the below line in to the box below to confirm delete.<br>
"<font color=red>I Confirm to delete the group</font>"<br>
<input type=text name=delmess size=30></td></tr>


<tr><td valign=top>&nbsp;</td><td><br><br>
All the mailid's under this group will get deleted.<br>
So check twice before calling delete.<br>
<input type=submit value=" DELETE " 
style="background-color: red; color: #adada3; width: 65px; border: #451023 px outset;"></td></tr>
</form>
</table>
</td>

<?php
//Second row second column
include "links.txt";
?>

</tr>

</table>
</div>

</td></tr></table>
</body>
</html>
<?php
}
?>
Return current item: Create Your Own Directory