Trying to echo PHP code from SQL and run it. And failing.
I've just discovered why I can't take PHP code from an SQL record, insert it into the page with 'echo', and not have all the PHP tags sit there on the page bold as brass for all the world to see.
What do you mean the PHP tags are for everyone to see??? And how do you want to keep PHP scripts in the database? Who is gonna pull them from there to actually execute? Did you ever try to see the page source generated by the PHP script on the browser side (this is what exactly the world sees)?
__________________ onPHP5.com - PHP5: Articles, News, Tutorials, Interviews, Software and more
Duno if our situations are the same however, when putting full scripts, even simple ones like;
<?php echo 'hello'; ?>
in a mysel database, and echo the output, the output actually looks like;
echo 'hello'; ?>
Therefore it does not execute the code from a MySQL Database. Can this be done, if so how?
Duno if our situations are the same however, when putting full scripts, even simple ones like;
<?php echo 'hello'; ?>
in a mysel database, and echo the output, the output actually looks like;
echo 'hello'; ?>
Therefore it does not execute the code from a MySQL Database. Can this be done, if so how?
If that's the output you're getting for all your scripting, PHP might not even be intalled on the server. All you should be seeing is