Validating user input - Php

Validate input

Snippet Code


  
Rate this page :
  [ 0 votes]

We cannot believe user input. So we have to make appropriate validation as trim all the white spaces and decode allthe html entities in the user input.

$str1 = trim(str1); $str1=html_entity_decode($str1);

Tags


Ask Questions

Ask Question