what is the best way to sanitize url input in php code example
Example: sanitize form data php
# sanitize form data
function clean($data)
{
$data = htmlspecialchars($data);
$data = stripslashes($data);
$data = trim($data);
return $data;
}