I am trying to read get parameters in such a way that will not open up potential security issues.
What I was thinking was matching the request parameter explicitly to what I expect and then setting a default for anything that doesn't match.
For example:
if ($_REQUEST['media'] == "video")
$sort = "video";
elseif ($_REQUEST['media'] == "audio")
$sort = "audio";
else
$sort = "both";
Is this enough or are further steps necessary?