Filter and Secure Input Forms - PHP Function

PHOTO EMBED

Thu Mar 24 2022 18:14:58 GMT+0000 (Coordinated Universal Time)

Saved by @Menzer #php #secure #input #forms

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

This is a simple quick function to filter input boxes from injections and Exploits in your forms.