Okay so I’ve come upon a really odd issue that I can’t figure out. I created a VARIABLE in my database that I called “posted”. Now I want it so that when someone posts on the page, it sets to 1. I will be making it so that if it’s set to one they cannot post anymore. Now… my problem is that my code sets it to 1 for all the users when someone posts.
FOR EXAMPLE.
I go on the website and post and the variable sets to 1 for all the registered users… So now no one can post!? The code I have created so far…:
[php] $gettop = mysql_query(“SELECT * FROM users”);
while($therow = mysql_fetch_assoc($gettop)) {
$id = $therow['id'];
mysql_query("UPDATE users SET posted = 1 WHERE id = '$id'");
}[/php]
THANKS IN ADVANCE