Hi, I'm trying to get this template script to work, but I can't, it's basically the same as vbulletin, it gets HTML code from the Database, and then acts as a HTML file while in the web browser.
The code is as follows:
<?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");
?>
The error I get is:
Parse error: parse error, unexpected T_STRING in c:\apscripts\index.php on line 17
Please excuse me if this is in the wrong forum, I am a newbie with PHP and this is wroking with the database, so please excuse it.🙂
Does anyone know the problem with this? Please help!
Thanks!🙂