Jim,
Two things you need to do is first don't rely solely on JavaScript to validate form data. I'm not a hacker, but it took me less than a minute to duplicate your membership form and stripping it of it's scripts. This allowed me to corrupt the data. I took out the maxlength attribute from the email field. This opens the door to spam.
This also opens the door to experiementing with your processing script. Even with your JavaScipt turned on I was able to enter a space " " as the data submit. Since my form page was not generated by JavaScript, JavaScript as to ask to close my window. No let's me try again without having to reload the page.
The real issue though is that you are trusting and processing unfiltered user data in your script. I would immediately stop using the $headers variable in the mail function. I believe it is so you send a copy of the application to the users email address. This is want is used to turn your site into a spam relay.
You need to process all of the $_Post data to ensure it is valid.
Code:
// removes whitespace from beginning and end of data, also empties data field if someone enters only a space
$bademail = trim($_POST['email']);
// check email format using php build in function
// ! mark means false, so if invalid email set flag to true
if (!filter_var($bademail, FILTER_VALIDATE_EMAIL) {$emailFlag = true;}
Bookmarks