I have my code for my forum (the user is adding a post):
$result = mysql_query("SELECT * FROM members WHERE username='$postedby' AND password='$password'");$count = mysql_affected_rows();if($count == 0){echo "<p align=center><b>Error</b> - The username and password don't match!<br><a href=# OnClick=history.go(-1) class=ts>(<<< Back)</a>";} else {
$sql = "INSERT INTO threads (forumid, subdate_t, title, message, postedby) VALUES ('$forumid','$subdate_t','$title','$message','$postedby')";$result2 = mysql_query($sql, $db);echo "<center><b>Thank you!</b> Information entered. <a href=index.php class=tl>Click here to go back to Forums.</a></center>";}
However I cannot get the first lot of code to work. I just get the ERROR all the time. What am I doing wrong?
Just out of curiosity how come all you lot know so much. Where can I learn THAT MUCH??