adamf Posted July 29, 2007 Share Posted July 29, 2007 I have a text area on a CMS I own but cannot get php tags/code to be saved into the database and ran when visiting the saved page online. Example code: <?php include "xxxx.php"; ?> Is it common for text area's to not save/display php or is there a simple solution around this? Your advise is much appreciated... Adam Quote Link to comment Share on other sites More sharing options...
zq29 Posted July 29, 2007 Share Posted July 29, 2007 Your CMS is very likely clensing your input, purposefully not allowing it to work. Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted July 29, 2007 Share Posted July 29, 2007 You'll need the eval() function to evaluate any php code. However, if the code is not even making it to the database, you have other problems and we might need to see some code. Edit: SA is quite possibly right. I assumed you are using your own CMS however. Quote Link to comment Share on other sites More sharing options...
corbin Posted July 29, 2007 Share Posted July 29, 2007 Edit: Someone beat me to it ;p Also, even if you were storing the PHP formatted correctly in the database, it would be output exactly as shown and not parsed. Look into eval. Quote Link to comment Share on other sites More sharing options...
adamf Posted July 29, 2007 Author Share Posted July 29, 2007 How would I go about parsing php saved inside a text area of my database? 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.