Tutorial Sanitize Database Inputs
1) Function for stripping out malicious bits function cleanInput($input) { $search = array( '@ @si', // Strip out javascrip...
https://iskablogs.blogspot.com/2014/03/tutorial-sanitize-database-inputs.html
1) Function for stripping out malicious bits
function cleanInput($input) {
$search = array(
'@@si', // Strip out javascript
'@<[\/\!]*?[^<>]*?>@si', // Strip out HTML tags
'@@siU', // Strip style tags properly
'@@' // Strip multi-line comments
);
$output =
function cleanInput($input) {
$search = array(
'@@si', // Strip out javascript
'@<[\/\!]*?[^<>]*?>@si', // Strip out HTML tags
'@@siU', // Strip style tags properly
'@@' // Strip multi-line comments
);
$output =