Refactor input validation
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
function validate($value) {
|
||||
$value = trim($value);
|
||||
$value = stripslashes($value);
|
||||
$value = htmlspecialchars($value);
|
||||
$value = htmlentities($value);
|
||||
return $value;
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user