This is the error
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'by, last) VALUES ('test', '5', '1', '1')' at line 1
This is my code:
$query = "INSERT INTO topics (title, forumid, by, last)
VALUES ('$title', '$forumid', '$userid', '$userid')";
Whats so wrong?
another problem:
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /host/z/c/o/zcollvee/viewforum.php on line 10
$query = "SELECT topic_id,title,by,last FROM topics WHERE forumid = '".$forumid."'";
$result = mysql_query($query);
while(list($topicid,$title,$by,$last) = mysql_fetch_row($result)){
//etc etc
WHAT IS WRONG?