0

ok so what i want to beable to do is have a coded up website template (with php in it) that is stored in the DB. and i would like to call it in a query. That part works fine but what doesnt work is the php being called from the DB. It seems like it just calls the php but it does not execute. I did look this problem up on the oracle (google) but saw told to stay away from eval(); or what ever it is.

Now you might be asking why i want to do this. well that is simple i would like to beable to change the template of site to something else by just uploading the code to the DB. Unless there is better way.

thanks in advance

Edited by itisnot_me: edit

3
Contributors
5
Replies
6
Views
7 Years
Discussion Span
Last Post by itisnot_me
0

ok so what i want to beable to do is have a coded up website template (with php in it) that is stored in the DB. and i would like to call it in a query. That part works fine but what doesnt work is the php being called from the DB. It seems like it just calls the php but it does not execute. I did look this problem up on the oracle (google) but saw told to stay away from eval(); or what ever it is.

Now you might be asking why i want to do this. well that is simple i would like to beable to change the template of site to something else by just uploading the code to the DB. Unless there is better way.

thanks in advance

If the HTML is stored in DB, you don't have any other option except taking that html and modifying the way you want and inserting back.
You can easily copy the that data while editing, if you have phpMyAdmin.
Don't forget to get the backup of it

0

understand but what about running php from the DB. in my template i also have php to call the navigation and info from the DB on top of html.

0

understand but what about running php from the DB. in my template i also have php to call the navigation and info from the DB on top of html.

you need to do the same for it

0

You could write the code to a file (saving it with a .htm or .php suffix) in a temp directory and then re-direct to that page. You'll want to limit the access to that directory so hackers can't create their own pages there.

0

ya i was thinking that is what i would have to do. even though it would be awesome if you can run some php from the DB but with some good security features

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.