Hi folks,
I am having problems with this script. The idea is that if a user is of a certain type, they are either displayed or not displayed particular information.
In this querey the result->type is 3, but, the second if condition still runs. Please offer a suggestion!
Thanks in advance,
-Tim
$q1 = "SELECT type from i6users where id = $i6token[uid]";
$result1=mysql_query($q1,$i6link);
$p1 = mysql_fetch_object($result1);
print "$p1->type";
if ($p1->type=1) {
$q = "SELECT * FROM i6articles
WHERE pid = '$projectID' and post_type = 1
ORDER BY pid
";
$result=mysql_query($q,$i6link);
if ( mysql_num_rows($result) > 0 ) {
echo "something";
}
}