{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

PHP Form Validation.pptx

PHP Form Validation.pptx - PHP Form Validation Reason 1 To...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
PHP Form Validation
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Why validate?! Reason 1: To ensure that data submitted via the form is sensible Remember, validation won’t check the accuracy of the data but it will make sure that the data input meets certain requirements You can also check that all required fields have been completed Reason 2: To prevent abuse of your form from hackers/spammers Either looking to hijack your mail server and use it to send spam or Getting links to spam sites published on your web pages
Background image of page 2
Validating your form Client side form validation gives immediate feedback to the user Common checks include: Field check – has data been entered in the field? Format check – e.g. phone number/email address Confirmation check – e.g. password or email address are typed in two separate fields and compared
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Validating your form (2) If data entered in a field contradicts the validation rule set up, then you need to provide your user with feedback
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}