Okay, here is my code for members.php:
Code:
<?php
include('admincp/mysql_connect.php');
$main = "SELECT * FROM members WHERE rank = ";
# edit the ends of the following to mimic the MySQL stored data that determines
# the ranking.
# edit the keys of the array to mimic the desired output ranking.
$sql["Council"] = $main . "Council";
$sql["Senior Members"] = $main . "Senior Member";
$sql["Members"] = $main . "Member";
echo '<div style="text-align: center">';
foreach($sql as $key => $current){
echo "<p><u>$key</u></p><p>";
$do = mysql_query($current);
while($row = mysql_fetch_assoc($do)){
echo $row['member'] . '<br />';
}
echo '</p><p> </p>';
}
?>
Even though i'm not exactly sure how $current works in foreach($sql as $key => $current){
I still changed everything else that needed to be changed to fit my MySQL db and etc.
Check the page to see the error.