The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Displaying Posts from a Thread
Hi all,
I'm trying to display every post in a specified thread on an external page. I'm using this (awful) code but I'm not able to get it to display anything. Anyone got any ideas as to why? I'm not the best when it comes to PHP and MySQL. Thanks. Code:
<?php $username = *FORUM_DB_USERNAME* $password = *FORUM_DB_PASSWORD* $forumcon = new PDO('mysql:host=localhost;dbname=*FORUM_DB_NAME*', $username, $password); $posts = "SELECT `title`, `pagetext` FROM `post` WHERE `threadid=2"; //specified threadid 2 $result = $forumcon->prepare($posts); $result->execute(); while($row = $result-fetch()) { echo "<b>" . htmlspecialchars($row['title']) . "</b>"; echo "<hr />"; echo htmlspecialchars($row['pagetext']); echo "<br /><br />"; } ?> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|