Tutorial Sanitize Database Inputs

1) Function for stripping out malicious bits function cleanInput($input) { $search = array( '@ @si', // Strip out javascrip...

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 =

Hot in Week

Popular

Archive

item