Well, I finally got the below code to generate a pull down menu as a list of names, I then want to email the person selected, which I can do with the below...
Name:
<?php
include "connect.php";
$recmem=mysql_query("SELECT name,email FROM namelist ORDER BY name",$db);
?>
<select name="name">
<?php
while($rows=mysql_fetch_array($recmem)) {
?>
<option value="<?php echo $rows["email"]?>">
<?echo $rows["name"]?></option>
<?php
}
?>
</select>
I can then mail $name using the email providing in the same row as the name selected, however, I want to insert the name selected, not the email selected into my db.
If I insert $name, I just get the email address, is there any way to put in the name instead?
I hope the makes sense
Thanks for any help 🙂