How do I escape data that is going into a database?
<?php
$mydata = "hello I'm great";
$mydata = addslashes($mydata);
//now contains: hello I\'m great
?>
Comment on this Question and Answer >>>
ASK A QUESTION
More forms PHP Questions
I currently use this form on my site: NameHow do I know if magic quotes is switched on?
How can I check a value entered in a field on my form is a number?
how to avoid the refresh or goback to submit the post values in database
how to i decimal, comma, and $ format a number called from mysql displayed in a table cell using php. This is the call script and this is the formatting script How do I replace the $value=123... with my call script? Thanks
