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

if($block != true)

$mails = $_POST['mailf'];
$groupn = $_POST['gname'];

include 'header.txt';

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



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

.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;}


<tr height=90% width=100% bgcolor="#0f7f0f">
<td width=100%>

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

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);
		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>
<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>
$qer = "select * from groupname";
$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>";
<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>

//Second row second column
include "links.txt";


Return current item: Create Your Own Directory