PHP server-side validation

PHP server-side validation

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
// Validate the name
if (empty($formVars["name"]))
      // the user's surname cannot be a null string
      $errorString .= "\n<br>The name field cannot be blank.";
PHP cookies
A cookie is used for identification purposes. It is more commonly used to identify a user in a session. It is a small file the application inserts on the users computer......
PHP sessions
PHP sessions introduction - When a user logs in an application, his details are usually stored in a session variable.....
PHP security
PHP security tips - Avoid the use of global variables. Hence it must be ensured that register_globals option is not enabled.....
Post your comment

You may like