PHP: How can variables stored in a blob field, and then have them populated later?
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
No, I don't mean that. That would be the same. In my opinion you must have Hello $firstname $lastname in your database. I think, that you don't insert the values to your database, but the variables name. Please check the code, where you insert the data to your database.
The part of code you have posted is alright the way I understand it.
No, I don't mean that. That would be the same. In my opinion you must have Hello $firstname $lastname in your database. I think, that you don't insert the values to your database, but the variables name. Please check the code, where you insert the data to your database.
The part of code you have posted is alright the way I understand it.
Just a warning. When you use eval like that, remember to be very careful checking the input. What is going to stop people from posting all kinds of PHP code in the textarea? Since stuff like exec is possible, you are basically giving a shell to everyone.
Generally speaking, most of the time when eval is used, you should think twice about the design. Can you do it without using eval? If you have to use it, you need to carefully filter the input.
Just a warning. When you use eval like that, remember to be very careful checking the input. What is going to stop people from posting all kinds of PHP code in the textarea? Since stuff like exec is possible, you are basically giving a shell to everyone.
Generally speaking, most of the time when eval is used, you should think twice about the design. Can you do it without using eval? If you have to use it, you need to carefully filter the input.
What is an alternative method to eval, when trying to populate variables in the results of a query?
Hmm. I don't really know what you are trying to do. But you have a web page where people are supposed to enter PHP code? If so, I guess you have a list of variables they can use? Then simply changing the strings will be a lot safer.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.