Who to select value from DropDown list in PHP???Problem
Posted
by sandy
on Stack Overflow
See other posts from Stack Overflow
or by sandy
Published on 2010-04-11T10:25:41Z
Indexed on
2010/04/11
10:33 UTC
Read the original article
Hit count: 258
Hello ..
I want to know the error in this code
The following code retrieves the names of the members of the database query in the dropdownlist
But how do I know who you selected.... I want to send messages only to the members that selected form dropdown list
<?php
include ("connect.php");
$name = $_POST['sector_list'];
echo $name ;
?>
<form method="POST" action="" >
<input type="hidden" name="sector" value="sector_list">
<select name="sector_list" class="inputstandard">
<option size ="40" value="default">send to </option>
<?php
$result = mysql_query('select * from members ')
or die (mysql_error());
while ($row = mysql_fetch_assoc($result)) {
echo '<option size ="40" value=" '. $row['MemberID'] . '" name="' . $row['MemberName']. '">' . $row['MemberName']. '</option>';
}
?>
</select>
</form>
I hope somebody can help me
© Stack Overflow or respective owner