store php code in a mysql database
Posted: Mon Nov 02, 2009 6:20 am
i am trying to store php code in a mysql table and i am using html and the <?php tags. When i make the insertion the result is to store only the text and html entities without the php tags. i.e.
i want to store the following string
before inserting the string in the database i us htmlentities($dynamicText, ENT_QUOTES, 'UTF-8')
" this is simple text and the text <?php echo $dynamicText ; ?> is dynamic <br />"
and the string stored in the database is
" this is simple text and the text is dynamic <br />"
do you know what seems to be the problem?
My table engine is innodb , encoding utf8 and row format compact if this helps
i want to store the following string
before inserting the string in the database i us htmlentities($dynamicText, ENT_QUOTES, 'UTF-8')
" this is simple text and the text <?php echo $dynamicText ; ?> is dynamic <br />"
and the string stored in the database is
" this is simple text and the text is dynamic <br />"
do you know what seems to be the problem?
My table engine is innodb , encoding utf8 and row format compact if this helps