Wednesday, February 7, 2018

Sanitization of Input Data

Use this function to remove spaces, slashes \ or / and html tags given in input


function verifyinput($data) {
  $data = trim($data);
  $data = stripslashes($data);
  $data = htmlspecialchars($data);
  return $data;
}

No comments:

Post a Comment