Hey fellow programmers,
It's 12:50 in the AM and i'm still up, battling with my project...
A quick one: I'm trying to include a "Multiline List Box", something like a drop-down list, for the "Course name" area of the student_reg.php page.
Here's my code:
Language: PHP
<td>
Course name:
</td>
<td >
<select name="courses" style=width:"150px">
<option value="" selected>Select a course...</option>
//================================
//SELECT LIST OF COURSES AVAILABLE
//================================
<?php
$query = "SELECT * FROM course";
$result = mysql_query($query) or die (mysql_error());
while ($row = mysql_fetch_array($result)){
echo "<option value=" . $row[';cname';] . ">";
echo "</option>";
}
?>
</select>
It's working fine except that the courses are not showing. It's printing out the rows but the names are not visible.
What could be wrong in the code?
Thanks in anticipation...
78026962 afojonny