From: andy amol

>    I am using the following code, but it is not populating my script. If
you can help I would be grateful.
>   I am using mysql as database.
> <?
> $sql = "SELECT course_id FROM course";
> $sql_result = mysql_query($sql)
> or die("Couldn't execute query.");
> while ($row = mysql_fetch_array($sql_result)) {
> $type = $row["course_id"];
> $typedesc =$row["dept_id"];
> $option_block .= "<OPTION value=\"$type\">$typedesc</OPTION>";

You're using ["dept_id"], but not selecting that column in your query.

---John Holmes...

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to