How to use validations in php?(codelgniter)
Answers were Sorted based on User's Feedback
Answer / solutio magister
Validations can be done through JAVASCRIPT. Since
JavaScript is a browser side scripting language validations
can be done by avoiding the processing time in server side.
| Is This Answer Correct ? | 13 Yes | 3 No |
Answer / 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 |
What are the limitations or drawbacks of PHP ?
Explain about Functions in PHP?
How to retrieve the original query string?
Is php a case sensitive language?
can we swap two different string using php for example:-- before swapping:-- 1 string :-hello friend, 2 string :-my dear, after swapping that strings will be: 1.hello dear, 2.my friend.
Which of the delimiter is ASP style?
What is the exact Diff. between include_once() and require_once() in PHP?
What is session cookies php?
How can I check if a value is already in an array?
3 Answers Rushmore Consultancy,
What are the advantages of php?
What is the difference between mysql_fetch_array() and mysql_fetch_assoc()?
Is time a dependent variable?