addslashes replacement?
| From: | Ed Lazor | Date: | Wed, 30 Jun 2004 18:09:49 +0000 |
| Subject: | addslashes replacement? | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-35059@lists.php.net to get a copy of this message | ||
I'm using php addslashes to store data into MySQL and php stripslashes when
pulling it back out, but I'm running into trouble when people enter HTML
code. Do you have any recommendations?
Here's an example of what I'm talking about:
<input name="Title" value="<?php echo
stripslashes($Entry["Title"]);?>">
An error occurs if the entry has a value of:
this is a <font color="red"><b>test</b></font>. Are we having
FUN yet?
Any ideas or recommendations?
Thanks,
-Ed