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
what is constructor
How to make database connection in php?
Why delimiter is used in mysql?
What are helpers in php?
Is age a variable in research?
Tell me which programming language does php resemble to?
How do I run a php program in dreamweaver?
what is the scope of php in the future if any other language is developed then may be php is loss ???
How come the code works, but does not for two-dimensional array of mine?
Which php function will attach one file to another?
Do you know what is the difference between the include() and require() functions?
Write down the code for save an uploaded file using php?
Explain the differences between get and post methods?
How to call php function in jquery?
What is a php array?