Hello guys,
I have a couple of quick questions regarding mysql queries.
Right know I check the database string values that people insert from the site like this:
This is just a guess but won't I need to add mysqli_real_escape_string after stripslashes if I got magic quotes on and will mysqli_real_escape_string be enough to secure the string?PHP Code:if (get_magic_quotes_gpc()) {
return stripslashes($input);
} else {
return mysqli_real_escape_string($db,$input);
}
And will I also have to check the inputs with mysqli_real_escape_string once people want to load data (besides for inserting data) and is there a way I can check if the data is a number instead of string?
thanks in advance




Reply With Quote

Bookmarks