asgsoft Posted July 7, 2007 Share Posted July 7, 2007 Hi I would like to get some help with this. In my database I have two fields, one contains HTML and the other PHP code. How can I output the code so that the HTML is shown and also PHP is processed? Any Ideas? Thanks Quote Link to comment Share on other sites More sharing options...
Jewbilee Posted July 7, 2007 Share Posted July 7, 2007 you would need to echo both the HTML and PHP... make sure that when you echo the HTML, that you've properly formatted it by escaping the quotes and everything. I've never done it myself, but i dont see why it wouldn't work. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted July 7, 2007 Share Posted July 7, 2007 If you are storing PHP code in the database you'll need to eval it. Otherwise will treat the PHP code as plain text it wont process it. Be careful when using eval Quote Link to comment Share on other sites More sharing options...
asgsoft Posted July 7, 2007 Author Share Posted July 7, 2007 Can you explain how I can use it with a variable like this: $string = "<?php ob_start(); ob_implicit_flush(); ?>"; and then use it? Any help would be great Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.