| Given below is a simple php function to format the input to the database inorder to avoid the SQL injection. function formatInput($str_value){ //function to format strings in a query $str_value = (!get_magic_quotes_gpc()) ? addslashes($str_value) : $str_value; $str_value = trim($str_value); $str_value = ($str_value != "") ? "'" . $str_value . "'" : "NULL"; return $str_value; } | |
| As you can see the function checks whether the magic quote feature of server is on and if not it adds slashes to the single and double quotes. If magic quotes is on the input value t the function will be having the single and double quotes escaped with a backslah. before returning the value, single quotes are appended and prepending to the text. SAMPLE USAGE $myQry=" SELECT * FROM TBL_INVENTORY WHERE PURCHASE_CODE = ".formatInput($purchase_code); | |
Intex Aqua 5.5 VR Plus genuine Review - Dont Buy Intex Aqua 5.5 VR Plus - Board complaint and low battery backup issues
Intex Aqua 5.5 VR Plus Review - Dont Buy Intex Aqua 5.5 VR + - Board complaint and low battery backup issues I bought an Intex Aqua 5.5 VR Plus on April 23, 2018, With in a week it started to show Battery backup issues. Even if it is charged full, it will completely drain out with in 12 or 13 hours. During this time No internet was used, only 2 or 3 calls were done. Some times there was issues with net connection also.

Comments
Post a Comment