Here is what I have . . . a function which is supposed to grab all the players from a specific database, with the criteria of $pos (position), and then print them into a pulldown box (<select>).
Problem is that when it works out it doesn't fill the pulldown with anything but blank lines.
function listplayers ($pos) {
global $MySQL_Link;
global $TBL_Pla;
global $TBL_Team;
$query="SELECT id, name FROM $TBL_Pla WHERE $TBL_Pla.pos='$pos' AND $TBL_Pla.team='$TBL_Team.id' AND $TBL_Team.conf='0'";
$result=@mysql_query($query); ///// Run the query
while($row=mysql_fetch_array($result, MYSQL_NUM)) { ///// Return a record if exists
echo '<option value="'.$row[0].'">'.$row[1];
}
} ///// End of function
Help !