Hi I’m developing an application with HTML and javascript (jquery), the HTML has a form that later sends an email passing the data by get method.
The email is being sent by php on the server, but until I validated the fields of the form I received mail service notifications with mails undisclosed-recipients:; and all the fields null. My concern is that someone or something is trying to get info. Could anybody help with this.
Note if you need to put my code I can post it but what I want to know is how somebody is passing data null to my php.
You can’t rely on javascript alone to do your validation, you MUST validate server side.
You’re probably getting visits from bots. Make sure to validate the presence of AND validity of all your fields, and use
$_POSTinstead of$_GET.Make sure the script that sends the email cannot be accessed by
$_GET, meaning by simply typing in the url. If I type in:It should not be able to send an email, that’s why I say to use
$_POST. However, if you validate properly it should not be sending you empty values no matter which method you use.