Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to use validations in php?(codelgniter)

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


Please Help Members By Posting Answers For Below Questions

What does $_cookie means?

1035


What is composer json?

965


How can we check the value of a given variable is a number?

1133


Maine 12th ke bad 2 years ka web designing ka course kiya hai. Php me achcha hu. Ek fresher ko is field me kitna mil sakta hai ?

5229


How to write in a file in php?

1062


What is variable declaration?

1004


What is super keyword in php?

1155


What is html used for?

1070


Do you know what is the use of the function 'imagetypes()'?

1081


What is the correct line to use within the php.ini file, to specify that 128mb would be the maximum amount of memory that a script may use?

1042


What are the two most common ways to start and finish a php block of code?

1186


Are php variables global?

1069


What are access specifiers?

1069


Which software is best for php?

1054


Is false empty php?

1045