devinemke wrote:[man]eval[/man]
This is the whole code that still doesn't work...
<html>
<head>
<title>Logo Test Page</title>
</head>
<body>
<?php
function get_logo($pageno)
{
$sqlconnect = mysql_connect('database.stuffed.co.uk','username','password') or
die(mysql_error());
mysql_select_db('adverts') or
die(mysql_error());
$query = "SELECT
logo_name
FROM logo
WHERE page_id = $pageno
AND cancelled = 0
ORDER BY position_id";
$results = mysql_query($query) or
die(mysql_error());
while ($rows = mysql_fetch_array($results)) {
extract($rows);
print(eval($logo_name));
}
}
}
get_logo(1)
?>
</body>
</html>
with the logo_name field containing:
<?php
if (@include('/var/www/vhosts/ads/phpadsnew.inc.php')) {
if (!isset($phpAds_context)) $phpAds_context = array();
$phpAds_raw = view_raw ('zone:526', 0, '_blank', '', '0', $phpAds_context);
echo $phpAds_raw['html'];
}
?>
Can't get it to work at all.