PHP Help


Penguin Rancher
I tried to fill out the form and I got this message

Thank you for your inquiry.

Thank you for your feedback. Your comments and suggestions are much appreciated. Note that although I read every comment sent to me, it may not be possible for me to reply to every message.

File does not exist!

It looks like when you submit the script, variables like mime and mime-version are being saved to the data structure "postVars."

The script (code below) tests whether those variables are set. If they are set, trip the spam condition.

So on your second consecutive execution of the script, you will trip the condition. This is protecting against spammers.

if (ereg("mime-version", $postVars) || ereg("mime", $postVars) || ereg("bcc", $postVars) || ereg("cc", $postVars)) {
mail("", "Form Hijack Attempt", "A spam relay was attempted from the StudioPSP and was blocked.","From:SpamMonitor");
echo "<p align='center'>Sorry, you may not spam this website.</p>";
//No form provided
Last edited:


OSNN Godlike Veteran
I want protection against spammers but some people might want to contact the owner more than once, is there a way to fix this?


Penguin Rancher
I was able to just use the back button and resubmit the form. I did not receive any error or spam message from the script. Give this a try.
Add this to the "Thank You" page.
<a href="javascript:history.go(-1)">Send another message.</a>

Another option would be:

You could check whether the person using the script came from your site or is accessing the script directly from some other location. You could scrap the original spam check.

// Determine if server name is in referer value (ex. is in
// if expression is not null and not false, allow something
// Refferer check ok, do something
This would be less desired because referer information can be "spoofed" and some legitimate users might be turned away. For instance if someone came to your contact page directly from Google.

Members online

Latest posts

Latest profile posts

Yes, but the uptime has been fabulous, X would be proud!
Hello, is there anybody in there? Just nod if you can hear me ...
What a long strange trip it's been. =)

Forum statistics

Latest member