hmm for some reason my script will only show 1 field when it should show 2 both with images see if you can see whats wrong with my script i know its messy, but im quite new...
<?php
$username="user";
$password="pass";
$database="db1";
mysql_connect("localhost",$username,$password);
@mysql_select_db($database) OR die( "Unable to select database");
$query="SELECT * FROM ibf_members WHERE (`mgroup`='6' OR `mgroup_others`='6') ORDER BY `joined`";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
echo "<b><center>Roster</center></b><br>";
$i=0;
while ($i < $num) {
echo($num);
$name=mysql_result($result,$i,"name");
$email=mysql_result($result,$i,"email");
$id=mysql_result($result,$i,"id");
mysql_connect("localhost",$username,$password);
@mysql_select_db($database) OR die( "Unable to select database");
$sql="SELECT * FROM ibf_pfields_content WHERE (`member_id`='$id')";
$result2=mysql_query($sql);
$num=mysql_numrows($result2);
mysql_close();
$image=mysql_result($result2,$i,"field_2");
?>
<font face="Arial, Helvetica, sans-serif"><a href="index.php?showuser=<? echo $id; ?>"><? echo $name; ?></a><img src=/style_flags/<? echo $image; ?>></font><br>
<?php
$i++;
}
?>