HELP!
Hi, guys i have a question which i'm sure is really simple to you all but i'm a newbie so please forgive me. I'm trying to create a pull down menu which pulls information off a mysql database. I have it pulling information and populating the pull down menu however i want it to return a numeric value and every time i hit the submit button it always returns a one no matter what thing i pick from the pull down menu. I don't get it. I thought there was something wrong with my for loop but the other values in the pull down menu change. Many thanx
This is my code:
$result = mysql_query ("Select CLASSDESC, CLASSID from CLASSLIST", $db);
$num = mysql_num_rows($result);
<select name = "CLASSID">
<?php
for ( $i = 0; $i < $num; $i++)
{
$CLASS= mysql_result($result,$i,'CLASSDESC');
$CLASSID= mysql_result($result,$i,'CLASSID');
echo "<option value='$CLASSID'>$CLASS</option>";
}
?>
<P><input type="Submit" name="submit" value="Enter information"></p>
</SELECT>