Need help in submitting a contact form to a phpmyadmin database

So you added the other 50% of the code in your thankyou page missing from the above example - the part that actually validates that the $_POST values are meaningful and not complete junk?

1 Like

Hence the word “Nearly” I’m going to assume validation is where it checks if an email or such has @ and identifies the domain name? And denies any variables going to the database. If you have any links to any tutorials that works and is compatible with php7 please share. :smiley:

Have a look at PHP validation filters - they cover about 1% of validation (including email addresses)

Validation is where you make sure that what was input is valid so if you are validating an email address then the entire adress of up to 255 characters before the @ and up to 63 characters after the @ must comply with the standard for what is considered to be a valid email address - eg. “!! @@ !!”@[127.0.0.1] is a valid email address according to the rules while b`@example.com is not. A name usually only consists of letters spaces and a small number of special characters such as apostrophe and hyphen so you’d validate that it doesn’t contain any numbers or % or other characters not valid in a name - and so on for every single field input into the program.

The validation is the most important half (or more than half in some cases) of the code.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.