Hey, can anybody help me with this piece of code:
<?php
error_reporting(7);
ini_set("display_errors", "on");
$name="%";
include "config.php";
$module = "eng";
function gettemplate($location) {
global $module, $name;
switch ($module)
{
CASE "eng":
$query = "SELECT code FROM site_templates WHERE name =\'" . $location . "\'";
break;
CASE "arab":
$query = "SELECT code FROM arab_templates WHERE name =\'" . $location . "\'";
break;
default:
$query = "SELECT code FROM site_templates WHERE name =\'" . $location . "\'";
break;
}
if (mysql_errno()) print mysql_error();
$result = mysql_query($query);
$template = mysql_fetch_array($result);
return $template;
}
gettemplate("logolocation");
?>
All it returns is a blank page. Now the idea is to Have a MySQL based Template system, sort of which you would find in vbulletin.
Now, does anybody find anything wrong with this? Because I can't see it!
Any Help is Very much apprechiated!