![]() |
|
|
+ Search |
![]()
|
Mar 15th, 2008 18:08
ha mo, Matthew Wilkinson, mr robinsf,
You can just store them as strings in the database, and then when you
retrieve them from the database just run them like this:
eval($PHPcodefromdatabasestring);
Here is an example of the full code:
$PHPcode = "echo \"This PHP code was taken from a database\";";
mysql_query("INSERT INTO tablename SET column='" . $PHPcode . "'");
$result = mysql_query("SELECT column FROM table");
$PHPcodefromDB = mysql_fetch_row($result);
eval($PHPcodefromDB);
This should output:
This PHP code was taken from a database
http://www.tantofa.com
http://www.fantofa.com
http://www.mantofa.com
http://www.tanpola.com
http://www.tampola.com
http://www.mozmar.com
http://www.yamot.com
http://www.templatestemp.com