Thanks Mr.Bill, very nice script. The only problem I noticed with it is the fact that the advert section shows up on every page (including admin) when it really only needs to be on index, newest, and most. I just added a quick function and if statement to it to do that.
for any one that wants/needs it (the red text is what i added to advert.php):
Code:
<?php
/* Only Show Ads on Index, New, and Top */
function curPageName() {
return substr($_SERVER["SCRIPT_NAME"],strrpos($_SERVER["SCRIPT_NAME"],"/")+1);
}
$PageName = curPageName();
if ($PageName == 'index.php' || $PageName == 'newest.php' || $PageName == 'most.php') {
$adverts = mysql_query("SELECT * FROM `admin`") or die('Error selecting site name');
while($rowt = mysql_fetch_array($adverts)) {
echo "";
$advert = html_entity_decode($rowt['advert'], ENT_NOQUOTES);
echo "<p align=\"center\">".$advert."</p>";
}
}
?>
Cheers!
Bookmarks