How to use validations in php?(codelgniter)

Answers were Sorted based on User's Feedback



How to use validations in php?(codelgniter)..

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

How to use validations in php?(codelgniter)..

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

Post New Answer

More PHP Interview Questions

Is php a middleware?

0 Answers  


What is static in php?

0 Answers  


Do you know what is use of count() function in php?

0 Answers  


Can I write php code in html file?

0 Answers  


What does namespace mean in php?

0 Answers  






What is the difference between a session and cookies?

0 Answers  


What is inheritance in php progaming?

1 Answers  


What will the ?getdate() function returns in PHP?

0 Answers  


If anybody integrate "First Data Global Payment Gateway" in your site?

2 Answers  


What do you mean range() in php?

0 Answers  


What language is similar to php?

0 Answers  


What is the function used to change the root directory in PHP?

0 Answers  


Categories