I am making a report problem link on my website and I want it to email me the last address they were on before clicking on the report link. I know/think you use $_SERVER[‘HTTP_REFERER’] but I dont know how to put that in the mail code?So how would you write that here is my mail code with out it.
Mail("email@email.com", "Subject", "Message");
echo "Report Sent";
The message should be a variable that you can put information in:
Note that the
HTTP_REFERERbit is placed within {} in the string. That’s to force it to extrapolate the value (I don’t like string concatenation).Also note that, as has been said above, there’s no guarantee that the REFERER will have the right value, or any value at all.