Last Forum Posts

Hey! So, I don’t know if this is the current section, couldn’t really decide on what section/board to post it, so …

I’ve got a code that I got from a friend of mine (it was a gaming website (a game server), but he shut it down, I asked for some scripts, he sent me the whole site …). I got all other scripts correctly, but I do not know how to get this Last Forum Posts to work (IP.Board). I’ve got the SEO set up as it should and everything, doesn’t work.

When I use this
[php]<?php
$_handlerForum = new mysql(“Forum”,“localhost”,"*********_fqipb2","*********_fqipb2",“password”);

$topics = $_handlerForum->fetch("SELECT `tid`,`title`,`last_post`,`title_seo`,`last_poster_name` FROM `topics` ORDER BY `last_post` DESC LIMIT 0,3;",array());

$content = "";

foreach($topics as $topic) {
	$content .= "<a href='http://website.com/forum/index.php?/topic/".$topic['tid']."-".$topic['title_seo']."' target='_blank'>".$topic['title']."</a><br />
		<small class='dim'>".$topic['last_poster_name']." - ".date("H:i F d, Y",$topic['last_post'])."</small><hr style='margin: 5px 0px;' />";
}

return $content;

return "Under Construction";

?>[/php]
I get this error
[php]Fatal error: Class ‘mysql’ not found in /home/***/***/***/public_html/extra/forum.php on line 2[/php]
Thought that the problem was “new mysql” (on line 2), so I put in mysql_connect, still get an error. Can anyone help?

In lne 2 you are calling a class called mysql, that looks to be a db wrapper of some sort. The question is, do you have a mysql class?

Sponsor our Newsletter | Privacy Policy | Terms of Service