Jump to content

[SOLVED] Execute php from database


dreamwest

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.