Hi!
Can anyone tell me why this php-script doesn't fetch the value in my select/option form-field when I push the submit-button? It's just like he doesn't find any value in the drop-down. Is it because this is generated by a database and a loop?
[code=php]$sql = "SELECT * FROM hiredPeople ORDER BY email DESC";
$result = mysql_query($sql, $connection);
echo "<form action='";?><?=$PHP_SELF;?><?php echo "'
method='get' name='Receiver' target='mainFrame'>
<table>
<tr>
<td><select name='mailreceiverl_1'>
$numbers = mysql_num_rows($result);
for ($i = 0; $i<$numbers; $i++){
$row = mysql_fetch_array($result);
echo "<option>";
echo "{$row['email']}";
echo "</option>";
}
</td>
</tr>
<tr>
<td><input name='send' type='submit' value='update' /></td>
</tr>
if($_POST['send']) {
if(!empty($_POST['mailreceiverl_1'])){
$receiver1 = $_POST['mailreceiverl_1'];
$receiver1 = trim($receiver1);
$receiver1 = htmlentities($receiver1);
echo "<p>your e-mail was: ";
echo $motBestVerkVolv_1;
echo "</p>";
} [/code]
thanks!