Is there any way to do this..
Posted: Fri Jan 02, 2009 11:16 pm
Very undescriptive title, sorry, but its hard to sum up..
Anyways, I am creating a script that lets people create guestbooks for their sites and I am trying to make it completely customizable to the user by letting them control exactly how the messages are set up. They are able to do this through a textbox on an admin page which saves the code of the message to a mySQL table.
Here is a sample of the code for the message
So that gets stored to a mySQL column named 'message' and is called from the page that actually displays the message by
but even though other PHP works on the site, the php read from the mySQL table only show up on the site like text, not actual php code.
So my question is, is there any way to make it be read as php code, not just text?
Thanks
Anyways, I am creating a script that lets people create guestbooks for their sites and I am trying to make it completely customizable to the user by letting them control exactly how the messages are set up. They are able to do this through a textbox on an admin page which saves the code of the message to a mySQL table.
Here is a sample of the code for the message
Code: Select all
<table>
<tr>
<td>Name</td>
<td>echo($name)</td>
</tr>
<tr>
<td colspan='2'>
<? echo($message) ?>
</td>
</tr>
</table>Code: Select all
echo($data['message']);So my question is, is there any way to make it be read as php code, not just text?
Thanks