dreamwest Posted November 16, 2009 Share Posted November 16, 2009 I have some php code snippets stored in my database: <?php echo 'Hello'; ?> How can i select this and execute it?? If not is there an alternative?? $res = mysql_query("select * from code were id =1"); $row= mysql_fetch_assoc($res); $code = $row['code']; //this is the code to be executed Link to comment https://forums.phpfreaks.com/topic/181696-solved-execute-php-from-database/ Share on other sites More sharing options...
trq Posted November 16, 2009 Share Posted November 16, 2009 This is generally a bad design choice but take a look at eval. Link to comment https://forums.phpfreaks.com/topic/181696-solved-execute-php-from-database/#findComment-958302 Share on other sites More sharing options...
dreamwest Posted November 16, 2009 Author Share Posted November 16, 2009 Awesome! Just what i needed Link to comment https://forums.phpfreaks.com/topic/181696-solved-execute-php-from-database/#findComment-958346 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.