Can't seem to find any docs on this, so here goes:
The ubercool block system includes a feature to let you add custom blocks, and it has a PHP toggle for using custom PHP code.
I have a piece of standalone code that works anywhere on my site. However when I add these lines to the block, no results appear on the page. I see the header for my custom block, but no content. Am I missing some magic lube?
///////////////////
/* Grab most recent movie */
$DBhost = "localhost";
$DBuser = "**********";
$DBpass = "**********";
mysql_connect($DBhost,$DBuser,$DBpass) or die("Unable toconnect to database");
$DBName = "videodb";
$table = "videodata";
@mysql_select_db("$DBName") or die("Unable to select database $DBName");
$sqlquery = "SELECT * FROM $table ORDER BY created DESC LIMIT 1";
$result = mysql_query($sqlquery);
$number = mysql_numrows($result);
$i = 0;
while ($number > $i) {
$thetitle = mysql_result($result,$i,"title");
$thedir = mysql_result($result,$i,"director");
$theid = mysql_result($result,$i,"id");
$theimg = mysql_result($result,$i,"imgurl");
preg_match("/\.(jpe?g|gif|png)$/i", $theimg, $matches);
$newmd5 = md5($theimg);
$ext = $matches[0];
$thumb = "http://www.richmcninch.com/videodb/cache/img/$newmd5$ext";
print "
Title: $thetitle
Director:
$thedir
";
$i++;
}
?>
/////////////////
Thanks for any help you can offer.