how to use php code stored in mysql database?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
benjamina
Forum Newbie
Posts: 1
Joined: Mon Nov 17, 2008 11:46 pm

how to use php code stored in mysql database?

Post by benjamina »

I was wondering 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?
User avatar
Syntac
Forum Contributor
Posts: 327
Joined: Sun Sep 14, 2008 7:59 pm

Re: how to use php code stored in mysql database?

Post by Syntac »

Try eval().
Post Reply