PDA

View Full Version : Not processing php


peter123
11-05-2008, 10:40 AM
hello,



I am working on a site in which i need it to print text from a file to a form. Right now i am using the include function. Main problem with this is, I want the ability to edit php code in the box, and with include, and the code is processed. I am wondering if there is a way to print the text from a file, ignoring all php code so I get the whole thing in the text area.

Thanks

lux
11-05-2008, 11:07 AM
Use the htmlentities() function:


$str = "php code here";

echo htmlentities($str);

davidj
11-05-2008, 02:29 PM
assign the text to a variable and echo the variables in the form fields

why dont you use a databses for this