I am currently making a forum and I have run into a small problem on the script that allows you to edit a post. The code for it is
$message = trim($message);
$message = strip_tags($message);
if ($t2 != 1) {
mysql_query("UPDATE new_forum_replies SET message='$message' WHERE id='$tid'") or die(mysql_error());
$f = mysql_query("SELECT * FROM new_forum_replies WHERE id='$tid'") or die(mysql_error());
$f = mysql_fetch_array($f);
$nforum = mysql_query("SELECT forumid FROM new_forum_thread WHERE threadid='$f[threadid]'") or die(mysql_error());
$nforum = mysql_fetch_array($nforum);
$forum = $nforum[forumid];
}
echo "<META HTTP-EQUIV='Refresh' CONTENT='1; URL=forum.php?id=$forum'>";
message("Edit Post...","Successfully Edited.");
(This is just the part that is not working.)
The problem is that it does not update and the variable $forum is blank. All of the fields are the right name and all the variables are posted from another name. The variables are spelled correctly and the function message() is my own. There are no errors messages, but like I said, the problem is that it is not updating and $forum is blank. Also the variable $tid is the thread ID.
Thanks in advanced