nitesh.vaghani Posted July 16, 2007 Share Posted July 16, 2007 Hello Friends. I have one problem during add php code inside tinyMCE wysiwyg editor. When i written php code inside it and update it at that time it remove php script from that content. What can i do for it? so it accept php code and display it on front side. Thanks Nitesh Quote Link to comment https://forums.phpfreaks.com/topic/60194-how-to-add-php-code-inside-tinymce-editor/ Share on other sites More sharing options...
ToonMariner Posted July 16, 2007 Share Posted July 16, 2007 use the html entity value (like <) instead or see if the <pre> tag is available Quote Link to comment https://forums.phpfreaks.com/topic/60194-how-to-add-php-code-inside-tinymce-editor/#findComment-299460 Share on other sites More sharing options...
nitesh.vaghani Posted July 17, 2007 Author Share Posted July 17, 2007 Thanks. It will work, but in front end side of page it display same what ever written inside it. mean if we write <?php echo "nitesh" ?> then it display on front home page <?php echo "nitesh"; ?> insted of it only display name "nitesh" on behalft of this. is it possible to execute php code when it retrive from detabase and display on page. Thank again Nitesh Quote Link to comment https://forums.phpfreaks.com/topic/60194-how-to-add-php-code-inside-tinymce-editor/#findComment-300134 Share on other sites More sharing options...
RichardRotterdam Posted July 17, 2007 Share Posted July 17, 2007 <?php echo "nitesh"; ?> You can't paste that into the textarea your trying to execute php clientside which is impossible Quote Link to comment https://forums.phpfreaks.com/topic/60194-how-to-add-php-code-inside-tinymce-editor/#findComment-300179 Share on other sites More sharing options...
ToonMariner Posted July 17, 2007 Share Posted July 17, 2007 Apologies for the OP i thought you wanted to display php code not execute it. In order to execute code in this manner (ie code stored in database etc.) you will need to use the eval function http://uk.php.net/manual/en/function.eval.php Quote Link to comment https://forums.phpfreaks.com/topic/60194-how-to-add-php-code-inside-tinymce-editor/#findComment-300200 Share on other sites More sharing options...
nitesh.vaghani Posted July 17, 2007 Author Share Posted July 17, 2007 Reply, hi dear, i am also try as u say. But what happen in this way, i am currently using tinymce editor for input data. this editor i wysiwyg editor so when it display content on front side at that time it give error, like this "Parse error: syntax error, unexpected '&' in filename with line no : eval()'d code on line 1" but it work with simple editor. Thanks Nits Quote Link to comment https://forums.phpfreaks.com/topic/60194-how-to-add-php-code-inside-tinymce-editor/#findComment-300279 Share on other sites More sharing options...
ToonMariner Posted July 17, 2007 Share Posted July 17, 2007 check that the tag braces are not being converted to & lt; or & gt; Quote Link to comment https://forums.phpfreaks.com/topic/60194-how-to-add-php-code-inside-tinymce-editor/#findComment-300313 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.