Question by WWW.MYHIBRID.COM: How to use php code stored in mysql database?
I know how pull data from the database but I have stored within the a mysql field some text data. Within that that text I have put in some php variables. The problem is that when the browser renders the data that pulled from my sql, the variable stays as $ user for example rather than changing to what I needed to. Is there any way to have the server process the php code stored within the mysql database?
Answer by dhvrm
If you mean you have stored some page code in a MySQL field; in that data, there is PHP code; and you want that data to be evaluated as PHP code, you just call eval().
$ row = mysql_fetch_array($ rs);
What do you think? Answer below!
There are no revisions for this post.