Answer Posted / vileye
There are various ways to validate a data in php. It depends
on what you want to validate. The various validations are as
follows:
FILTER_VALIDATE_INT Validate value as integer, optionally
from the specified range
FILTER_VALIDATE_BOOLEAN Return TRUE for "1", "true", "on"
and "yes", FALSE for "0", "false", "off", "no", and "", NULL
otherwise
FILTER_VALIDATE_FLOAT Validate value as float
FILTER_VALIDATE_REGEXP Validate value against regexp, a
Perl-compatible regular expression
FILTER_VALIDATE_URL Validate value as URL, optionally with
required components
FILTER_VALIDATE_EMAIL Validate value as e-mail
FILTER_VALIDATE_IP Validate value as IP address, optionally
only IPv4 or IPv6 or not from private or reserved ranges
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
Explain me difference between mysql_connect and mysql_pconnect?
How to randomly retrieve a value from an array?
What is the importance of php?
What is php ci?
What is full form of php? Who is the father or inventor of php?
What is the use of inner join in mysql?
What is mysql_fetch_row?
What are the benefits of using php?
How can I convert ereg expressions to preg in php?
What is echo and print in php?
What is difference between include,require,include_once and require_once()?
How do I find out the number of parameters passed into function9?
What is csrf mvc?
Does php use html?
Explain me what is sql injection?