This PHP code does not work inside an HTML file but it works if its a PHP file
$con = mysql_connect("localhost","root","aaaa");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("maptemp", $con);
$sql = "SELECT * FROM users";
$rs = mysql_query($sql) or die(mysql_error());
$selectbox='<select name=\'userst\'>';
while ($row = mysql_fetch_assoc($rs)) {
$selectbox.='<option value=\"' . $row['username'] . '\">' . $row['username'] . '</option>';
}
$selectbox.='</select>';
mysql_free_result($rs);
echo $selectbox;
.php
. – Wesley Murch