basically what I'm trying to do is fill a drop down menue with all the data from a column in mysql.
here is what i have so far
function admin_user(){
include 'mysql.php';
$query=("SELECT * from website");
$result=mysql_query($query, $db);
if(!$result)die('Problem getting user names, sorry' .mysql_error());
$data=mysql_fetch_row($result);
$count=mysql_num_rows($result);
echo $count;
$username=$data[0];
mysql_close($db);
echo '<form name="form1" method="post" action="">';
echo '<table width="292" border="1" align="center" cellpadding="0" cellspacing="0">';
echo '<tr>';
echo '<td width="140" height="25" valign="top"><span style="color:FFFFFF">Select user to modfy </td>';
echo '<td width="152" valign="top"><div align="center">';
echo '<label>';
echo '<span style="color:FFFFFF"><option>'.$username.'</option>';
echo '</select>';
echo '</label>';
echo '</div></td>';
echo '</tr>';
echo '<tr>';
echo '<td height="26" colspan="2" valign="top"><div align="center"><span style="color:FFFFFF">Click here to invite user using invite system </div></td>';
echo '</tr>';
echo '<tr>';
echo '<td height="2"></td>';
echo '<td></td>';
echo '</tr>';
echo '</table>';
echo '<div align="center"></div>';
echo '</form>';
}
Now $count returns the amount of 2. However only one is displayed. I belive i need a while loop or something to that extent..... But i do not know how to forumlate it.