When the browser sends header info to the server, $_SERVER['HTTP_REFERER'] should give us the previous page URL right?
What returns from $_SERVER['HTTP_REFERER'], when header info is not sent to server? empty string? false? null? or… ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If the HTTP referer request header is not sent then the
$_SERVER['HTTP_REFERER']is probably not set, although it could be an empty string. Whether it is set or not in this case could depend on the server.As with all HTTP request headers, check for its existence when reading: