views:

96

answers:

2

I'm using HTML contact forms on a business site to post lead information to Salesforce. We're using auto-responders to deliver key information to people who complete a form asking for additional information. The goal is to reject forms that are submitted by competitors. It doesn't need to be bullet proof; the main idea is to reject and form that has an email address associated with a competitor's domain.

Can anyone help? Thanks!

A: 

Try making an array of all emailadresses like this

$emails = array($this->getEmails());
if(is_array($emails) && in_array($_POST["emailadres"],$emails))
{
// if we are here then it is not blacklisted
return true; // or whatever 
}
else
{
return false; // eighter it was a blacklisted email or the $emails wasnt an array  
}
streetparade
could I make an array of blacklisted email addresses and use wildcards with domains? the blacklist is way shorter than the whitelist. For example I would want it to return false if the email was [email protected].
Tim
A: 

Are you programming the form? If so, input validation? Not sure of the question here, but sounds like simple input validation.

George Sisco
Im also not sure what needs
streetparade
yes, there is some validation going on. It is Javascript validation of an HTML form. I don't know how to do the blacklist part, however.
Tim