I have template html/php stored in a database.
I can get it to retrieve the code and the html displays fine, but no php code does. If i view source i can see the php and its in light pink
This is how it appears
<body>
<?php include'function.php'; ?>
<p>
This is how i retrieve it
<?php
$con = mysql_connect('localhost', '*****', '*****') or die('Could not connect to database!');
mysql_select_db('*****', $con);
$sql = "SELECT code
FROM user_templates
WHERE user = '".mysql_real_escape_string($_GET['user'])."'
LIMIT 1";
$result = mysql_query($sql);
if(!$result) { die("Error Loading Template Data"); }
while ($row = mysql_fetch_array($result)) {
print $row['code'];
}
?>
Whys it do this?