Re: Reprocessing text

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 18, 2005 6:25 am, Michael Satterwhite said:
> I have a site that extracts HTML page code from a database and prints it
> to the page being generated. A user has requested that I allow this text
> to be dynamic. I can code process functions for the code that I pull
> from the database, but it would be so much better if I could simply get
> PHP to process the text for me.
>
> Does anyone know a way to cause this to happen?

Yes, but...

If you mean you want to allow your users to write PHP code in their HTML,
and have your script execute that PHP code, then you want:
http://php.net/eval

Buuuuuuuuuuuuut

This would be incredibly dangerous unless you REALLY REALLY REALLY trust
ALL your users. They could do some really nasty things with PHP if you let
them.

Tell us more about the data and the user and what you really want -- We
might have a safer answer for you...

One simple one might be to allow them to give you a URL where you will get
the text, and then you get their current text, instead of whatever is in
your databsae.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux