Jump to content

Recommended Posts

No, it is not a glitch. I am assuming you are storing "text" in the form of PHP code in your database and then querying for that code - which is actually "text" not code. You could use the exec() command, but I think there are probably much better solutions than storing PHP code int he database to begin with.

Link to comment
https://forums.phpfreaks.com/topic/95750-php-from-mysql/#findComment-490247
Share on other sites

what ways then?

 

Keep the code in the php file where it belongs and not in the database. A database is meant for data not code. You have not provided any information concerning the reason for wanting to put code into the database so I cannot provide any meaningful comments. But, the fact that you can't simply take "code" from the database and have it execute should be a clue that it was not built for that purpose.

 

But, like I said you should be able to so it with exec()

Link to comment
https://forums.phpfreaks.com/topic/95750-php-from-mysql/#findComment-490251
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.