I think the problems in this line:
$business = safeHTML($_POST["business"]);
safeHTML??? Is this likely to be affecting the text submitted?
I've got a variable $f[business] which is retrieved from a MYSQL database. The field is set to 'TEXT' and contains text in HTML format so its got <b> <p> etc...
Unfortunetly it reads the text as is and just prints all the HTML commands on the page ignoring it as actual code - How do I get it to read the HTML code??
Thanks in advance...[/b]
$business = safeHTML($_POST["business"]); What is
Moderator: General Moderators
$business = safeHTML($_POST["business"]); What is
Last edited by supaseeds on Mon Jul 26, 2004 8:07 am, edited 3 times in total.
OK, im one step closer with
but it wont read <br> or <P> etc only <B>
Code: Select all
echo html_entity_decode($fїbusiness]);Thanks for the help but with
PHPSPECIALCHARS I get:
TEST<B>TEST</B>
printed on screen. In the MYSQL database it stores the data in the same manor, but I've noticed its simply not storing <BR> in the database at all....
I think the problems in this line:
$business = safeHTML($_POST["business"]);
safeHTML??? Is this likely to be affecting the text submitted?
PHPSPECIALCHARS I get:
TEST<B>TEST</B>
printed on screen. In the MYSQL database it stores the data in the same manor, but I've noticed its simply not storing <BR> in the database at all....
I think the problems in this line:
$business = safeHTML($_POST["business"]);
safeHTML??? Is this likely to be affecting the text submitted?
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
how about:
Code: Select all
$business = nl2br(htmlentities($_POST['business'],ENT_QUOTES));Proberly, otherwise why send the submitted text through the safeHTML function?supaseeds wrote: I think the problems in this line:
$business = safeHTML($_POST["business"]);
safeHTML??? Is this likely to be affecting the text submitted?
I think safeHTML is a user function, find it and see what it does. It is proberly stoping all html from working which is proberly what you want. Then all you will need to do is replace all line breaks with <br> with either with nl2br() or str_replace().