Jump to content

Cant get results from dynamically populated drop down list


link7722

Recommended Posts

I am using a drop down list which is dynamically populated from mysql succesfully with the following code

<select name="user" id="user">

<?php

while ($row = mysql_fetch_array($query)) {

echo "<option value=\"".$row['id']."\">".$row['username']."\n ";

}

?>

</select>

My problem is that when i use $username = $_POST['user']; to get the result from the list its empty.

What am i doing wrong?

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.