Hi!
I have a MySQL database that has some page HTML which is echoed into a template file.
<?php
/* Connecting, selecting database */
$link = mysql_connect("localhost", "username", "pwl")
or die("Could not connect");
mysql_select_db("tycooneden_com") or die("Could not select database");
$query = "SELECT * FROM HTML WHERE page = '$page'";
$result = mysql_query($query) or die("Query failed");
$foo=mysql_fetch_array($result);
/* Start the clan defining */
$page=$foo['page'];
$code=$foo['code'];
mysql_close($link);
?>
<?=$code?>
The only prob is.... the cell that the HTML is in is text, and, the PHP code within that HTML isn't run, it jus shows in the source. What am I doing wrong?
Alex.