How to retrieve the php code from database and deploy it as a php statement in my php file??
retrieve the php code from database
Collapse
X
-
Why would you want to do that? Can't you figure out a different way to achieve what you are trying to achieve?
Firstly, you would do this by using some sort of statement that executes a string variable as PHP code.
But then you would be "coding blindly", executing code that you may no longer have direct control over. What if you made a mistake in the database entry? What if you made a mistake in the select statement to retrieve the data representing the PHP code? What if another user has access and puts something into the database that causes problems?
Far better would be to use database entries to make decisions about which already present code should be carried out, such as by using a switch statement.
Comment