slammeddime
Member
OP
I´m not very good with PHP, but here may be something to help you out...if I understand what you´re asking correctly.
First, in your message, if you want something to be run when called, put quotes like and around it.
In your code for where your page is displayed (ie: WebMagazine) add a function runCode(&$text). Pass in the text for your message into this function. Inside this function, do a substring on anything between and . Then use php´s eval() function to evaluate this the substring.
I would then have the function runCode() return the passed in message, only without the , and everything in between. That way it is not displayed to the viewer, but still in the database.
I haven´t done much PHP, and am still learning...but this may work for you.
First, in your message, if you want something to be run when called, put quotes like and around it.
In your code for where your page is displayed (ie: WebMagazine) add a function runCode(&$text). Pass in the text for your message into this function. Inside this function, do a substring on anything between and . Then use php´s eval() function to evaluate this the substring.
I would then have the function runCode() return the passed in message, only without the , and everything in between. That way it is not displayed to the viewer, but still in the database.
I haven´t done much PHP, and am still learning...but this may work for you.