Hey, I have a fully functionaly contact.php file that submits me data from my website, but unfortunately people are able to just click submit as many times as they want and it will send to me a blank email. Is there a way to stop this? Like if someone does not fill in the form then it will not be sent and redirect to an error page this is what i have so far if someone were to correct me and fill in what i need to do this i would be greatly appreciative. thanx!
*No real sites, emails used fake ones for privacy reasons
mail("firstname.lastname@example.org", $username, $password, "From: $username");
Now is there a code i can add to redirect my visitors to "errorwebsite.com" if they do not fill in 'username' or 'password'?