Posted by Peter Wilson on 06/19/05 17:10
In article <42b54c55$0$21663$e4fe514c@news.xs4all.nl>, Pr0 N00b
<nomail@mail.invalid> writes
>juglesh schreef:
>>
>> Pr0 N00b wrote:
>>
>>>mjamm schreef:
>>>
>>>>Hello
>>>>
>>>>Is there any way to execute PHP code from a database on to a .php browser
>>>>page?
>>>>
>>>>Basically, I am using 'LONGTEXT' to save HTML and other info to output to
>>>>the screen. Works well!
>>>>
>>>>I have tried saving something simple like <?php echo "HELLO!"; ?> to the db
>>>>and then calling it from the database, having the output perform the script
>>>>on to the screen.
>>>
>>>You should look at the eval() command. The only problem with it is that
>>>it doesn't like <?php and ?>, so your code would just be `echo "HELLO!";
>>
>>
>> 'less you go like this:
>> <?php
>> eval('?>' . $somethingsimple . '<?php ');
>> ?>
>
>W0W, never expected _that_ to work :-)
very nice but how do you get it to parse the code? there for executing
say the echo?
Peter
Motto "A smile aday keeps the blues away"
http://www.sci-comm.clara.net/
[Back to original message]
|