Hello,
Our volunteer-supported Web site currently uses PHP to dynamically retrieve pages from the server's file system. We would like to store the pages in a MySQL database and retrieve them from there. Our initial experiment works expect for the five pages which have PHP include statements in them. These statements do not execute.
We have tried this:
<?php
include ('./global/db/cmsconfig.php');
$result = mysql_query ("SELECT * FROM our_pages WHERE pagename='$strPagename'");
$row = mysql_fetch_array($result);
echo($row['pagecontent']);
?>
And changing this:
...same as above, but changing from echo to print
print($row['pagecontent']);
What are we doing wrong?
Or is it not possible to retrieve a page from MySQL and have embedded commands execute?
Any help would be appreciated.
Thanks,
Brian