Hi, I have the following code and I want it to show a dropdown list from slq rows. However, it does not work. How should this be formatted? Thanks <?php include('config.php'); $query = "SELECT * FROM subcategories ORDER BY cat_id ASC"; $result = mysql_query($query) or die('Sorry, could not access the database'); mysql_num_rows($result); $subcat_id = $row['subcat_id']; $subcat = $row['subcategorie_name']; $cat_id = $row['cat_id']; ?> <form action="addchan2.php" method="post"> <select name="subcat"> <?php while($row=mysql_fetch_array($result, MYSQL_ASSOC)) { $cat = $row['cat']; echo "<option value=\"$subcat\">$subcat</option>"; } ?> </select> <input type="text" name="chan"> <input type="text" name="subcat_id" value="<?echo"$subcat_id";?>"> <input type="text" name="cat_id" value="<?echo"$cat_id";?>"> <input type="submit" value="Add"> </form> PHP: