|  | Posted by Pr0 N00b on 06/19/05 13:43 
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 :-)
  Navigation: [Reply to this message] |