top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How can I validate my registration form using PHP?

+1 vote
315 views
How can I validate my registration form using PHP?
posted Jul 1, 2014 by Amanpreet Kaur

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

PHP works on Server. So Server side validations work when the client side validations fail to work ( if the java script is turned off).
These validations are typically checked for empty values, numbers only, valid email addresses etc. these validations are very essential to avoid SQL injection attacks.

Example: to check if name is entered
<?php // Validate the name if (empty($name)) { // the user's surname cannot be a null string $errorString .= "\n<br>The name field cannot be blank."; echo"$errorString"; } ?>

answer Jul 2, 2014 by Mohit Sharma
...