?

Search Help Board

PHP FAQ
PHP Articles
PHP Help
Bulletin Board

PHP Manual (NEW!)
First Time PHP'ers
Help with programming
Sql assignment help
PHP Homework Help


C# Help

?
?Re: Formating Data before storing to DB
Author:??(---.cpe.net.cable.roger)
Date:???09-22-03 06:49

there is the htmlentities (http://ca2.php.net/manual/en/function.htmlentities.php) function that can do what you need, but then you need to reverse it to show the users the same data as they input...

a simpler way is to replace the "<" and ">" tags with something else (usually "[" and "]") with the replace function

$text=replace("<","[",$inputText);
$text=replace(">","]",$inputText);

before the input into the db and then run the same replace but backwards when showing the data to the user

$text=replace("[","<",$inputText);
$text=replace("]",">",$inputText);

hth

?Topics Author? Date
?Formating Data before storing to DB??new
Ali Wazir 09-22-03 00:15?
?Re: Formating Data before storing to DB??new
bastien 09-22-03 06:49?
Go to Top??|??Go to Topic??|??Flat View??|??Search?
??|??
New Topic
?Reply To This Message
?Your Name:
?Your Email:
?Subject:
Email replies to this thread, to the address above.
????

Provided By
Phorum