I figured out how to integrate content from my PHP-Nuke content into a static page on my site. At WorldBeatPlanet, in addition to the dynamic content, I also have static sites for several artists. I now have database content integrated with Youssou N’dour’s page.
I renamed the main page from index.html to index.php and added the following bit of PHP code where I want the database content to appear:
<?php
$query = “select sid, title from nuke_stories where hometext like “%Youssou%” or bodytext like “%Youssou%” order by sid desc limit 10″;
$dbi=@mysql_connect(“localhost”, dbname”, dbpass”);
@mysql_select_db(“worldbeatplanet_com”);
$res=@mysql_query($query, $dbi);
echo “<ul>”;
while(list($sid, $title) = mysql_fetch_row($res)) {
echo “<li><a href=”http://www.worldbeatplanet.com/modules.php?name=News&file=article&sid=$sid”>$title</a>”;
}
echo “</ul>”;
@mysql_close($dbi);
?>