hello again. I still havent got my list junk working, and i'm going to cut and paste most of the code so hopefully someone can tell me whats wrong.
<form action="<? echo $_server['php_self']; ?> " method=post>
<select name=dept>
<?
mysql_connect("server", "username", "****");
mysql_select_db("db");
$result = mysql_query("select department from dept");
while ($row = mysql_fetch_array($result)) {
$name = $row["department"];
echo "<option value='$name'>'$name'\n";
}
?>
<input type=submit value="go">
</form>
I would think that would first generate the list, which it does, but I have tested the script by putting at the end something like,
<? echo "you chose department $name"; ?>
and always, it never fails, no matter what i select, it always tells me I selected whatever the last name was in the list.
is there something i'm either leaving out or not doing correctly in the script?
matt