mse2k
05-25-2010, 05:50 PM
i have integrated a php widget for the vbgallery. i like to show the newest galeries. But it doesn`t work. Can everyone give me a help? This is the code ...
ob_start();
$username = ''; // the username for your db
$password = ''; // the password for your db
$host = 'localhost'; // in 90% of cases its localhost, if not you can check in your vbulletin config file.
mysql_connect ($host, $username, $password) or die
("Keine Verbindung moeglich");
mysql_select_db("...") or die
("Die Datenbank existiert nicht.");
$ergebnis = "SELECT catid, title FROM ppgal_categories ORDER BY catid DESC LIMIT 2";
while($row = mysql_fetch_object($ergebnis))
{
$output_bits .= '<a href="http://........de/gallery/browseimages.php?c='.$row[catid].'">'.$row[title].'</a>';
}
mysql_close;
$output = $output_bits;
ob_end_clean();
thx
ob_start();
$username = ''; // the username for your db
$password = ''; // the password for your db
$host = 'localhost'; // in 90% of cases its localhost, if not you can check in your vbulletin config file.
mysql_connect ($host, $username, $password) or die
("Keine Verbindung moeglich");
mysql_select_db("...") or die
("Die Datenbank existiert nicht.");
$ergebnis = "SELECT catid, title FROM ppgal_categories ORDER BY catid DESC LIMIT 2";
while($row = mysql_fetch_object($ergebnis))
{
$output_bits .= '<a href="http://........de/gallery/browseimages.php?c='.$row[catid].'">'.$row[title].'</a>';
}
mysql_close;
$output = $output_bits;
ob_end_clean();
thx