Code: Select all
$pulldown .= "<option value=\"{$row['firstname']}\">{$row['firstname']}</option><br>";insidea space first then
$row['lastname']
thanks in advance...<option value=\"{$row['firstname']}\">
Moderator: General Moderators
Code: Select all
$pulldown .= "<option value=\"{$row['firstname']}\">{$row['firstname']}</option><br>";insidea space first then
$row['lastname']
thanks in advance...<option value=\"{$row['firstname']}\">
Code: Select all
$query = "SELECT id,concat(lastname,', ',firstname) as fullname FROM Names";Then use 'id' field, or something, as the value for your options and the concatenated names as the texts.Dano, Harrison
Ramota, Maricar
Bilagot, Carmencita
Code: Select all
while($data=mysql_fetch_array($result)){
$id = $data['id'];
$fullname = $data['fullname'];
$str = "
<option value='$id'>$fullname</option>";
}Code: Select all
"<option value=\"{$row['firstname']}\">Code: Select all
$str = "<option value=\"{$row['firstname']} {$row['lastname']}\">";Code: Select all
concat(lastname,', ',firstname) as fullname