I have some html + php stored in a mysql record. But when I echo the
contents:
$mydata->HTML="<input type="text" size="40" value="<?php
if($searchenquiry)
echo stripslashes(htmlspecialchars($searchenquiry));
?>" name="searchenquiry" />";
the php is not activated; rather I see <?php ... ?> in my html source.
It worked before, I thought.
P.S. is there a better way to use this function?
John
--------snip---------
display();
echo $contents;
function display()
{
global $contents, $PHP_SELF;
$file = basename($PHP_SELF);
include("connect.inc");
$sql = "SELECT * FROM `".$db."`.`".$table_editor."` WHERE `Filename`
LIKE '".$file."' LIMIT 0,1;";
$myquery = mysql_query($sql);
while ($mydata = mysql_fetch_object($myquery)) {
$contents = $mydata->HTML;
}
}
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php