No logro poder hacerlo.
Código PHP:
function privilegios($name)
{
$array_priv = array("Seleccionar", "Slot reservado", "Administrador común", "Administrador Semi Full", "Administrador Full", "Staff", "Dueño");
$num_priv = count($array_priv);
$query = "SELECT * from admins";
$result = mysql_query($query) or die(mysql_error());
echo "<select name=\"$name\">\n";
for ($i =0 ; $i < $num_priv; $i++)
{
$row = mysql_fetch_assoc($result) or die(mysql_error());
if ($i == $row["privilegio"])
echo "<option value=\"$i\" selected>$array_priv[$i]</option>\n";
else
echo "<option value=\"$i\">$array_priv[$i]</option>\n";
}
echo "</selected>\n";
}
Alguna ayuda?