Jump to content

Populating Drop down box with attributes from the MySQL database


aarbrouk

Recommended Posts

<p> Brand: <select name="BrandID" id="BrandID">

<?php

while ($row = mysql_fetch_assoc($result)){

$BrandID = $row['BrandID'];

$BrandName = $row['BrandName'];?>

<option value=<?php $BrandID?>><?php $BrandName?></option>

<?php } ?>

</select>

 

sorry I submitted this thread by accident without properly explaining the problem. This is the code I have at the moment. The problem I get is when I view the form, the drop down box contains values in the drop down but doesn't actually display them on the form. The drop down just contains blank values, but they there is something there to select.

 

help would be appreciated

 

many thanks

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.