I got this mysql table with a text field. One of the text entries contains:
<?
if(isset($_GET["id"])) {
include($index.".php");
} else {
include("front.php");
}
?>
How do I output that mysql data as the script is intented to do, when i retrieve mysql data? It just outputs the php in my index file without it doing anything.
Use
eval().See here: PHP Manual – eval()
But you should consider finding another solution to your problem that made you put the code into a mysql table. Most of the time things like that are easy avoidable and considered bad practice.