After this code above i have this:
pastebin.com/raw/DgD8UR4x This code was made by a friend some time ago, i think that this sanitize function is useless, the variable
$slug
don't need to be sanitized because i have the sql above, so all possible values for the variable
$slug
is in my database, if not, it will be redirected to
error.html
, and instead of this sanitize function i coud just write this code bellow: