bookmark_borderData validation and sanitization in PHP

Today we are going to see about the validating and sanitizing the data in PHP. What is different between validating and sanitizing the data.

Validating is used to check the data is perfect or not, for example passing the integer value in query-string.  It will validate the data its proper or not and the data will not be changed or remove unwanted characters.

Sanitizing is use to clean-up the data and modify by removing unwanted characters. For example instead of passing the integer value in query-string,  If we are passing string its clean the data by removing unwanted characters. Continue reading “Data validation and sanitization in PHP”