All pastes #227586 Raw Edit

7 moi

public text v1 · immutable
#227586 ·published 2006-10-29 11:06 UTC
rendered paste body
This is in my source form:

	$sql = mysql_query("SELECT DISTINCT user FROM products");
	echo '<select>'; 
	echo '<option selected>Select</option>';
	while($row = mysql_fetch_assoc($sql)) 
	{ 	
		echo '<option name="username" value="' . $row['user'] . '">' . $row['user'] . '</option>'; 	
		}

And this is what I do to read $username:


$username=$_POST['username'];
echo $username;