I am pretty new to php, but I am learning! I have a simple form on a client website. I am testing the form and when I click submit, I get the following error:
Form Mail Script
Wrong referrer (referring site). For security reasons the form can only be used, if the referring page is part of this website.
Note for the Admin: Please add the name of your server to the referrer variable in the index.php configuration file: mywebsite.com
Powered by Form Mail Script
I am looking through the forms configuration and support files but I do not understand exactly what it is I need to change.
Can someone please explain to me what the Admin note above means and how to fix it?
The referrer is a value that's usually sent to a server by a client (your browser) along with a request. It indicates the URL from which the requested resource was linked or submitted. This error is part of a security mechanism in FormMail that is intended to prevent the script from handling input that doesn't originate from your website.
For example, say your form is at http://www.foo.com/form.html and your script is at http://www.foo.com/script.php. If the script does not check the referrer value, I can create a form on my site at http://www.bar.com/myform.html and submit it to your script. Scripts that send mail are often abused in this manner to send spam.
To fix your problem, find the parameter in your script's configuration file that indicates the referrers that your script should handle input from and change it to include your domain or the specific URL of your page.
Note that referrer is generally misspelled as REFERER with only one 'R' within the context of the HTTP protocol.