Insert php code inside a textarea

Please report bugs and any annoyances here. Kindly include all possible details: steps to reproduce, expected result, actual result, screenshots, ... etc.
Post Reply
olivier
Posts: 5
Joined: 2016-10-21 19:47

Insert php code inside a textarea

Post by olivier » 2017-07-15 23:05

Hello,

I've been trying to write php line inside text areas (or rich areas) and when I save the data everytime all characters are replaced with other characters and then the php code can't be run.
This is an example : <?php echo "test"; ?> becomes <!--?php echo "test"; ?-->
Not very good at programming I had a glance at ci_input.php and I think that it deals with this.
How can we allow php coding in text areas ?
Thank you very much,
Olivier

User avatar
a.gneady
Site Admin
Posts: 1281
Joined: 2012-09-27 14:46
Contact:

Re: Insert php code inside a textarea

Post by a.gneady » 2017-07-25 15:03

PHP tags as well as many forms of HTML are filtered out from user input to prevent security issues. If you wish to store code samples into the database, try using an HTML area rather than a plain text area. Alternatively, you could enter &lt;?php instead of <?php in your text area.
:idea: AppGini plugins to add more power to your apps:
  • DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
  • Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
  • Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.

Post Reply