Validating data php
Nobody wants to shoot them but if they press their luck..Each of these allies have their own perimeters which may or may not trust ours. As noted in the Introduction, we trust nothing and nobody.
Input Validation is the outer defensive perimeter for your web application.
And when the page loads, the Java Script code will be executed (the user will see an alert box).
This is just a simple and harmless example how the PHP_SELF variable can be exploited.
You may opt for sending form data to a different file.
Validation for non-empty, alphabets and whitespace only The following code is added within the form So, if you try to understand how to write code for it step by step, step 1 is to declare the mail address to whom you want to send mail, step 2 is to write subject of the mail, step three is to collect data from POST so that you can write them to the body of mail, step 4 is to declare the mail id from which the mail is coming and finally sent mail with PHP mail() function.