Dealing with HTML characters in PHP
Posted: Tue Nov 10, 2009 4:52 pm
Hello,
I have a php script that takes what a user enters in a form and sends it to a MySQL database. (The form uses an opensource WYSIWYG to write the HTML) Problem is, when my page retreives the data from the MySQL database, it looks like this:
... and the result is that my text doesn't take on whatever properties the user gave it when submitting the form.
How do I prevent it from putting a "\" in front of every quotation?
Thanks,
-Jonathan
I have a php script that takes what a user enters in a form and sends it to a MySQL database. (The form uses an opensource WYSIWYG to write the HTML) Problem is, when my page retreives the data from the MySQL database, it looks like this:
Code: Select all
<p style=\"font-weight: bold;\">How do I prevent it from putting a "\" in front of every quotation?
Thanks,
-Jonathan