Organizational Research By

Surprising Reserch Topic

how do i execute php that is stored in a mysql database


how do i execute php that is stored in a mysql database  using -'php,mysql'

I'm trying to write a page that calls PHP that's stored in a MySQL database. The page that is stored in the MySQL database contains PHP (and HTML) code which I want to run on page load.

How could I go about doing this?
    

asked Sep 15, 2015 by AidHerron
0 votes
6 views



Related Hot Questions

1 Answer

0 votes

You can use the eval command for this. I would recommend against this though, because there's a lot of pitfalls using this approach. Debugging is hard(er), it implies some security risks (bad content in the DB gets executed, uh oh).

See (blogpost by a random person) Eval is Evil for instance. Google for Eval is Evil, and you'll find a lot of examples why you should find another solution.


Addition: Another good article with some references to exploits is this blogpost. Refers to past vBulletin and phpMyAdmin exploits which were caused by improper Eval usage.

answered Sep 15, 2015 by PriLindgren

...