biosphere Posted March 29, 2012 Share Posted March 29, 2012 I'm trying to use php code that is stored in the sql database, but It doesn't seem to be executing the code. when I see the page source, its there but the server is not executing the command how do I accomplish this. Here is a simple code snippet to show what I am trying to do. $result = mysql_query("select * from data"); $row = mysql_fetch_array($result); echo $row['code']; In the code field in data table this is whats there. <?php echo "testing."; ?> Quote Link to comment https://forums.phpfreaks.com/topic/259978-php-code-use-from-mysql-database/ Share on other sites More sharing options...
samshel Posted March 30, 2012 Share Posted March 30, 2012 Check this out : http://php.net/manual/en/function.eval.php Check out the bold warning in red as well Quote Link to comment https://forums.phpfreaks.com/topic/259978-php-code-use-from-mysql-database/#findComment-1332533 Share on other sites More sharing options...
biosphere Posted March 30, 2012 Author Share Posted March 30, 2012 Thanks for your help, are there any other ways to accomplish this without eval? Quote Link to comment https://forums.phpfreaks.com/topic/259978-php-code-use-from-mysql-database/#findComment-1332537 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.