I am making a simple if and else statement to get value from a requested link my code is
if($_REQUEST['f_id']=='')
{
$friend_id=0;
}
else
{
$friend_id=$_REQUEST['f_id'];
}
and suppose the link is www.example.com/profile.php?f_id=3
now its simple as if the f_id
is empty or with value either of the above if and else statement would run. but what is a user is just playing around with link and he removes the whole ?f_id=3
with link left to be opened with www.example.com/profile.php
then how to detect that f_id
dosen't exist and in that case redirect to a error page ?