imoudu13 / CampusTalk

0 stars 1 forks source link

sanitize input PHP #61

Open imoudu13 opened 5 months ago

imoudu13 commented 5 months ago

Go trough all the php code. For all the insertions into the db that require user input make sure to sanitize them like so:

$input = "<script> alert('I am the goat') </script>";

$sanitized = htmlspecialchars($input, ENT_QUOTES, 'UTF-8');

Good for security.

The only thing that might change from that code above is the php variable names.