Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function clean($postVars)
- {
- $len = count($postVars);
- $i=0;
- $cleaned = array();
- while($i < $len) {
- $cleaned[$postVars[$i]] = mysql_escape_string( strip_tags( html_entities($_POST[$postVars[$i]], ENT_QUOTES,'UTF-8') );
- $i++;
- }
- return $cleaned;
- }
- $fields = array('newUser','newPass','newPassConfirm','newMail');
- $data = clean($fields);
Add Comment
Please, Sign In to add comment