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

if($block != true)
{
?>


<?php
$mails = $_POST['mailf'];
$groupn = $_POST['gname'];

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 -->

<script language="JavaScript" src="validation.js">
</script>  

<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%>

<table width=100% height=100%  align=center border=0>
<tr height=100%>
<?php 
if($mails != "" && $mails != null)
{
echo "<td bgcolor=#dfdefa>";
$str = nl2br($mails);
$str =  explode("\n",$mails);
print_r($str);

echo("<div align=center style=\"background-color: #dfdefa; color: #9a9a9a;\">Added</div>");
foreach( $str as $maili)
{
	$qers = "insert into mailid values('','$maili','$groupn')";
	//echo $qers;
	$result = mysql_query($qers,$link);
	if($result)
	{
		echo "$maili";
	}
	
}

echo "</td>";
}
?>

<td width=60% style="border: 2px #47a985 solid;"  bgcolor="#efffef">
<table align=center width=30% style="color: #888888; font-weight: bold; padding-left: 20px;">
<tr><td valign=top>&nbsp;</td><td>Add one mail id per line</td></tr>
<tr><td valign=top>Mailid's</td>
<td>
<form name=addf method=post action="addmail.php" onSubmit="return checkMailId(this)">
<textarea rows=10 cols=25 name=mailf style="background-color: #90adff; 
color: #554455; font-weight: bold;"><?php echo "$mails"; ?></textarea></td></tr>
<tr><td valign=top>Group</td><td>
<?php
$qer = "select * from groupname";
//echo($qer);
$result = mysql_query($qer,$link);
echo "<select name=gname>";
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><input type=submit value=" Add " 
style="background-color: #245489; color: #adada3; width: 65px; border: #451023 px outset;"></td></tr>
</form>
</table>
</td>

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

</tr>
</table>

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