php - Selection list populated from database -


i have been having problem trying figure out how create selection list populated data table in database, namely options being customer's last names.

here have tried:

i trying make selection list access table "customer" , fields "customerid" appreciated, if more information needed ask.

you messing in quotes. try below.

$options .= "<option value='" . $id ."'>" . $name ."</option>"; 

and use like,

<select> <option value=0>choose</option> <?php echo $options; ?> </select> 

Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

ruby - Nesting modules inside of a Rails eninge gem -

Eclipse formatter for java ending braces -