top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

How can I validate my registration form using PHP?

+1 vote
81 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
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...