Ok well I want to display how many times an admin has posted news, here is my code.
$select2 = mysql_query("SELECT * FROM news WHERE `author` = '$row1'") or die(mysql_error());
$row2 = mysql_num_rows($select2);
I just want that to count how many entrys of news that admin has posted.Another one, I want to display if they are an admin or not. Here is my code.
$admin = "SELECT admin FROM users WHERE username = '$_SESSION[username]'"; $admin = mysql_query($admin); $admin = mysql_fetch_array($admin);It works fine in other cases, like when I want to hide a certain menu from regular users. However where im trying to use it now, it wont work. To display if they are an admin or not I use this.
<?php if($admin['admin'] == 1) {
echo 'Yes';
}else{
echo 'No';
} ?>
I am also having trouble with my "Update Profile" section. I posted this one a while back, but I recoded it a different way to update and now this one isnt working either. Here is the mysql_query parts, apparently my screwup is in here because I get a mysql error. Which is posted below it.
SOLVED!!!
If you can take a look at all of these, I would greatly appreciate it!
Edited by Korndawg, 29 September 2006 - 06:49 PM.
