i tried this:
form where i choose members of language and the text to be sent out:
send_email .php
<form method="POST" action="emailupd.php">
<p>Email Users</p>
<p>User Language <select id="newslang" name="newslang" size="1" name="Italian">
<option>English</option>
<option>Italian</option>
</select></p>
<p>Email <textarea rows="8" name="message" cols="48"></textarea></p>
<p> </p>
<p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>
now the action emailupd.php
<?
$db_host = 'xxx';
$db_user = 'xxx';
$db_pass = 'xxx';
$db_name = 'xxx';
$db_table = 'members';
$conn = mysql_connect($db_host,$db_user,$db_pass);
mysql_select_db($db_name,$conn);
// Get the user's input from the form
$newslang = $_POST['newslang'];
$message = $_POST['message'];
$sql = "SELECT email FROM members WHERE newslang like '$newslang'";
$result = mysql_query($sql);
$users_cout = mysql_num_rows($result);
for($i=0;$i<$users_count;$i++)
{
mysql_data_seek($result,$i);
$row = mysql_fetch_row($result);
}
?>
<?
// here put the mail prosedure knowing that $row[0] is the e-mail of the user
$headers = "Content-Type: text/html";
$to = "$row";
$message = $_POST['message'];
$newslang = $_POST['newslang'];
mail ("$to", "Trial send", "$message",$headers);
?>
after i click on submit on form i just get a blank page and users do not get any email at all! please help.