PDA

View Full Version : PHP within MySQL



Daniel Hollands
January 22nd, 2001, 13:02
Hi there, I'm new to PHP, but learning quick.
I'm working on a MySQL site at the moment, and I have a question for you all.

If I was to place all the HTML into a database field, I know that I can pull this out and have it display the HTML as I require it, however if I was to place some PHP code within the field, when I pull it out, will the code be executed, ot just displayed on the site?

If this is possable, is there anything special that I need to do?

Thank you for your time.

Woofcat
January 22nd, 2001, 13:58
Use eval()...

http://www.php.net/manual/en/function.eval.php

Daniel Hollands
January 22nd, 2001, 14:15
OK, so if I pull the code out of the database in to a variable, and eval() the variable, it will execute the code there and then.

Cool, but knowing my luck i'll magange to mess it up, thank you, I'l let you know how I get on.