Is there something wrong with the way I'm doing this because I emptied the database table to test this code and it's returning a value of "1" for $cc_rows...
$ccquerycount = "SELECT COUNT(*) FROM payments_cc_info WHERE user_id=$userid";
$ccresult = mysql_query($ccquerycount) or die(mysql_error());
$cc_rows = mysql_num_rows($ccresult);
echo $cc_rows;
if ($cc_rows > 0) {
echo '<div class="message_success" align="center">Credit Card info on file.<br />Edit settings to change.</div>';
} else {
echo '<div class="message_error" align="center">No Credit Card info on file.<br />Edit settings to change.</div>';
}