I'm working on a board with members and such. The member system is done and I'm just starting to work on posting. I've got a basic posting page that works: it sends the data to the database. But on the page that is supposed to display the posts, I'm getting this error:
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in public_html/board/displayposts/stuff/index.php on line 7
Line 7 is is part of code that fetches the URL for the poster's avatar from the database:
$avatarget = mysql_query("SELECT * FROM user WHEN username='$user'");
$getavatar = mysql_fetch_assoc($avatarget); # line 7
Now normally when I see that error, there's something wrong with the SQL statement. Are there any errors in $avatarget
?