Hello,
For some reason when I use a $membership_id that I know if not a valid ID in the table the (!$result) does not return a "true" value. It doesn't perform the "else" condition either, just falls through the entire "if". If the $membership_id is not a valid entry in the table, should it come back with the (!$result) being true?
Thanks for any help, Gary
if ($membership_id != "") {
$query = "SELECT * FROM agents WHERE id = $membership_id";
$result = mysql_query($query) or die ("Server Busy | Please use Back Button and Try Again [ 002 ] | ".mysql_error());
if (!$result) {
echo "[ 003 ]";
$error_status = "yes";
$error_message .= "<table width=\"760\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td height=\"20\" width=\"20\"><img src=\"images/red_triangle.gif\"></td>
<td height=\"20\" align=\"left\" valign=\"middle\"><font size=\"2\" face=\"Verdana, Arial, Helvetica, sans-serif\"><strong>MEMBERSHIP ID IS INVALID</strong></font></td>
</tr>
</table>"; }
else
while ($row = mysql_fetch_assoc($result)) {
$agent_id = $row["id"];
echo "agent_id: ". "$agent_id" . "<br>";
}
}
else
$membership_id = "n/a";