Adobe Dreamweaver 0
Adobe Muse 0
ASP.net 0
.htaccess 6
CSS 5
Perl 0
PHP 57
PHP - User System 79
HTML 11
Java 0
Javascript 13
Ruby on Rails 0
General Web Development 4
Operating Systems
Video & Audio Editing
Adobe After Effect 0
Adobe Audition 0
Adobe Premiere 0
Final Cut 0
FruityLoops 0
iMovie 0
Windows Movie Maker 0
App Development
Hardware
Miscellaneous
This is my forumdisplay:
$threadpcount = "$thread[posts]"; // Gets the post count
$threadmessage = "$thread[message]";
$bbctm = BBCODE($threadmessage);
echo ("<tr>
<td id='mains'> </td>");
if($thread[sticky] == Yes)
{
echo ("<td id='mains'><b>Sticky:</b> $bbctt2<em>$threadpcount - Posts</em></td></tr>");//Displays post count
}
else
{
echo ("<td id='mains'><b>$bbctt2</b> <em>$threadpcount - Posts</em></td></tr>");
}
And addreply:
case 'addreply':
$id = htmlspecialchars($_POST[id]);
$message = htmlspecialchars($_POST[message]);
$fetch_posts = mysql_query("SELECT * FROM `forum_thread` WHERE `id` = '$id'");
$posts = mysql_fetch_array($fetch_posts);//Gets the posts from the select thread
$posts2 = $posts[posts]+1;//Adds 1 post to the forum post cound
$posts2 = $posts[posts]+1;
$do = mysql_query("UPDATE `forum_thread` SET `posts` = '$posts2' WHERE `id` = '$id'");
$insert = mysql_query("INSERT INTO `forum_posts` (`message`, `poster`, `thr_id`, `posts`) VALUES ('$message', '$user', '$id', '$posts2')");
echo ("Thanks for your reply. <br><a href='javascript: history.go(-1)'>Go back.</a>");
break;
instead
in forum.php in the addreply case replace it with
again in forum but in the forumdisplay part
find and replace with
ALTER TABLE `forum_thread` ADD `posts` VARCHAR( 225 ) NOT NULL default '0',
MySQL said: Documentation
#1064 - 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 '' at line 1
#1064 - 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 '' at line 1
is the error. Why?
#1064 - 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 '' at line 1
is the error. Why?