Any help I can get here would be greatly appreciated.
Thanks,
Jim
Code: Select all
<?php require_once('DB_Connection.php');
$SQL = "SELECT * FROM `members` WHERE `Group`='pending'";
$SQL_Result = mysql_query($SQL) or die(mysql_error());
$SQL_Rows = mysql_num_rows($SQL_Result);
?>
<html>
<head>
<title>DB Membership Update</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK HREF="styles.css" TYPE="text/css" REL="stylesheet" TITLE="SPA styles">
</head>
<body>
<p></p>
<h3>Membership Database Update</h3>
<?php
// Simple informational header output below
if (!$SQL_Rows) {
echo "<p align='center'>There are no new members in the database.<br>";
echo "Please check again at a later time.</p>";
} else {
if ($SQL_Rows == 1) {
echo "<p align='center'>There is one new member below.</p>";
} else {
echo "<p align='center'>There are " . $SQL_Rows . " new members below.</p>";
}
// this loop displays all the new members in a table
for ($a=0; $a < $SQL_Rows; $a++) { // **** this is the loop to be removed ****
$array = mysql_fetch_assoc($SQL_Result);
if ($array['Group'] == "pending") {
echo "<table width='60%' border='1' align='center' cellpadding='2' cellspacing='2'>";
echo "<tr class='tbllabel'><td>User ID</td><td>Primary or Associate Member</td><td>Status</td></tr>";
echo "<tr class='tblfield'><td>" . $array['UID'] . "</td><td>" . $array['PriAssoc'] . "</td><td>"
. $array['Group'] . "</td></tr>";
echo "<tr class='tbllabel'><td>First Name</td><td colspan='2'>Last Name</td></tr>";
echo "<tr class='tblfield'><td>" . $array['FirstName'] . "</td><td colspan='2'>"
. $array['LastName'] . "</td></tr>";
echo "<tr class='tbllabel'><td>Addy1</td><td colspan='2'>Addy2</td></tr>";
echo "<tr class='tblfield'><td>" . $array['Address1'] . "</td><td colspan='2'>";
if (!$array['Address2']) {
echo " </td></tr>";
} else {
echo $array['Address2'] . "</td></tr>";
}
echo "<tr class='tbllabel'><td>City</td><td>State</td><td>Zip Code</td></tr>";
echo "<tr class='tblfield'><td>" . $array['City'] . "</td><td>" . $array['State'] . "</td><td>"
. $array['Zip'] . "</td></tr>";
echo "<tr class='tbllabel'><td>Area Code</td><td colspan='2'>Phone Number</td></tr>";
echo "<tr class='tblfield'><td>";
if (!$array['AreaCode']) {
echo " </td><td colspan='2'>";
} else {
echo "(" . $array['AreaCode'] . ")</td><td colspan='2'>";
}
if (!$array['Prefix']) {
echo " </td></tr>";
} else {
echo $array['Prefix'] . "-" . $array['Phone'] . "</td></tr>";
}
echo "<tr class='tbllabel'><td>E-mail Addy</td><td>VORC Mailed</td><td>VORC E-Mail</td></tr>";
echo "<tr class='tblfield'><td>";
if (!$array['EMailAddy']) {
echo " </td><td>";
} else {
echo $array['EMailAddy'] . "</td><td>";
}
if (!$array['Mail']) {
echo " </td><td>";
} else {
echo $array['Mail'] . "</td><td>";
}
if (!$array['EMail']) {
echo " </td></tr>";
} else {
echo $array['EMail'] . "</td></tr>";
}
echo "<tr class='tbllabel'><td>Date Joined</td><td>Membership Expires</td><td>Amount Paid</td></tr>";
echo "<tr class='tblfield'><td>" . $array['Joined'] . "</td><td>" . $array['Expires'] . "</td><td>$"
. $array['Amount'] . ".00</td></tr>";
echo "<tr class='tbllabel'><td colspan='3'>Transaction ID</td></tr>";
echo "<tr class='tblfield'><td colspan='3'>";
if (!$array['txn_id']) {
echo " </td></tr>";
} else {
echo $array['txn_id'] . "</td></tr>";
}
echo "</table><p> </p><hr align='center'><p> </p>"; // **** This is where I want the control to be ****
} //end if
} // end for loop
} // end of else
?>
</body>
</html>
<?php
mysql_free_result($SQL_Result);
?>