...

View Full Version : Listbox Select Question



rschoenbach
03-13-2007, 04:01 AM
Below is the code i am using to populate a listbox.



echo('<select name"course">');
while($row = mysql_fetch_array($result, MYSQL_ASSOC)){
echo "<option>".$row['course_name']."</option>";
}
echo('</select><br /><input type="submit" value="go" /></form>');


The table scheme is:
course_id int not null auto_increment
course_name char(150) not null

Is there a way with php to reference the course_id?

I can do
$course_name = $_POST['course'] just fine but cant figure out howto pull course_id out.

rschoenbach
03-13-2007, 04:31 AM
opps.. figured it out..


<option value="'.$row['course_id']'">



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum