quiero usar un sistema de templates con PHP y MySQL, cuando guardo el template en la DB tal y como se muestra aqui:
Código HTML:
<body bgcolor="black" text="white">
Código PHP:
function fetchTemplate ($templateName)
{
$Query = "select content from templates where name='$templateName'";
$tRes = mysql_query($Query);
$Template = mysql_fetch_array($tRes);
$Content = "echo \"$Template[content]\";";
return $Content;
}
function pageHeader($pageTitle)
{
eval (fetchTemplate("page_header"));
}
Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in C:\AppServ\www\x\functions.php(60) : eval()'d code on line 5
PD la linea 60 corresponde a la parte de:
Código PHP:
eval (fetchTemplate("page_header"));
Código HTML:
<body bgcolor=\"black\" text=\"white\">
![Afirmando](http://static.forosdelweb.com/fdwtheme/images/smilies/afirmar.gif)