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 Link to comment https://forums.phpfreaks.com/topic/62344-php-code-in-textarea/ 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. Link to comment https://forums.phpfreaks.com/topic/62344-php-code-in-textarea/#findComment-310239 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. Link to comment https://forums.phpfreaks.com/topic/62344-php-code-in-textarea/#findComment-310240 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. Link to comment https://forums.phpfreaks.com/topic/62344-php-code-in-textarea/#findComment-310241 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? Link to comment https://forums.phpfreaks.com/topic/62344-php-code-in-textarea/#findComment-310248 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.