Jump to content

How to add php code inside TinyMCE editor?


nitesh.vaghani

Recommended Posts

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

     

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

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

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

   

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.