|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
HTML-Code and PHP-Code in a MEMO-Field
Hi!
I have a mySQL-Table with a Longtext-Field where I post HTML-Code in. I show the content of the Longtext-Field in a file called index.php f.e. with <?PHP echo $var; ?> If there is normal HTML-Code in $var it is no problem. But if there is php-code in $var I have difficulties - nothing happens. Is there any idea, what kind of syntax I have to use in $var, to run php-code in my browser (index.php)? |
|
#2
|
|||
|
|||
|
RE: HTML-Code and PHP-Code in a MEMO-Field
Try using eval(), as in
You need to add the PHP closing tag at the beginning, otherwise the evaluation will start in PHP mode (and not in HTML, as is the case with files), which is probably not what you want. I hope you don't allow visitors to enter the code, though - it is EXTREMELY dangerous... |
|
#3
|
|||
|
|||
|
RE: HTML-Code and PHP-Code in a MEMO-Field
Thank you very much! It works very fine!
|
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Database Help > HTML-Code and PHP-Code in a MEMO-Field |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|