Topic awaiting preservation: calling PHP from a mySQL database (Page 1 of 1) |
|
---|---|
Nervous Wreck (II) Inmate From: Kansas, just this side of the rainbow |
posted 07-17-2005 04:50
This really burns my chaps, but I can store PHP in a mySQL table and retrieve it with everything working fine...as long as the PHP goes into the HEAD tag in a HTML page. HOWEVER, when I retrieve PHP from a mySQL table and place it in the BODY tag of a HTML page, it simply places in the file without parsing it. |
Maniac (V) Inmate From: under the bed |
posted 07-17-2005 05:16
can you be more specific? |
Nervous Wreck (II) Inmate From: Kansas, just this side of the rainbow |
posted 07-17-2005 05:33
Actually it is a simple include code (calling an external PHP file): code: <?php include( 'includes/catalog_menu.php'); ?>
code: <body> <table> <tr> <td> some text.<br> <?php include( 'includes/catalog_menu.php'); ?> </td> </tr> </table> </body>
|
Bipolar (III) Inmate From: Australia |
posted 07-17-2005 08:50
At first guess i would say its to do with the ' marks. I'm also assuming you are getting the database entries using PHP. |
Bipolar (III) Inmate From: f(x) |
posted 07-17-2005 10:45
I think I know what you want... leme know if I'm correct. code: <a href="some_page.php"><?php echo 'hello'; ?></a>
code: <a href="some_page.php">hello</a>
code: <a href="some_page.php"><?php echo 'hello'; ?></a>
code: eval('?>'.$php2print.'<?php');
|
Maniac (V) Inmate From: there...no..there..... |
posted 07-22-2005 03:50
a little off topic, but what is the advantage of storing an includes statement in a database? |
Bipolar (III) Inmate From: Australia |
posted 07-22-2005 07:12
Could be generating static pages maybe? |