How do I know if magic quotes is switched on?
get_magic_quotes_gpc which will return 1 if the setting is on and 0 if off.
Use it in an if clause to determine what to do with data before entering in a database, like this:
<?php
if (!get_magic_quotes_gpc()) {
$mydata = addslashes($mydata);
} else {
//do nothing: slashes added automatically
}
?>
Comment on this Question and Answer >>>
ASK A QUESTION
More forms PHP Questions
Hello: I receive two error messages when I try to submit a form. The messages are: Warning: mysqli_query() [function.mysqli-query]: Empty query in /home/content/PRIVATE/html/riskyjobs_riskybusiness_Database_TableSetup_riskyjobs_Table_Chapter9_Page5how to avoid the refresh or goback to submit the post values in database
How can I access information sent through POST on a form?
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
how do i validate the name into form ?
