Found 34490 Articles for Programming

FILTER_VALIDATE_FLOAT constant in PHP

Ankith Reddy
Updated on 27-Dec-2019 10:21:28

210 Views

The FILTER_VALIDATE_FLOAT constant validates a value as a float number.ReturnThe FILTER_VALIDATE_FLOAT constant does not return anything.Example Live DemoOutputThe following is the output.float(291.9)

FILTER_VALIDATE_EMAIL constant in PHP

George John
Updated on 27-Dec-2019 10:17:35

319 Views

The FILTER_VALIDATE_EMAIL() constant validates an email address.ReturnThe FILTER_VALIDATE_EMAIL() does not return anything.Example Live DemoOutputThe following is the output.examplee@demo.com = valid email address

FILTER_VALIDATE_BOOLEAN constant in PHP

Chandu yadav
Updated on 27-Dec-2019 10:15:03

257 Views

The FILTER_VALIDATE_BOOLEAN constant validates value as a boolean option.ReturnThe FILTER_VALIDATE_BOOLEAN constant returns TRUE for "1", "true", "on" and "yes". It returns FALSE for "0", "false", "off" and "no" otherwise, NULL.Example Live DemoOutputThe following is the output.bool(true)ExampleLet us see another example.OutputHere is the output.bool(false)

filter_var() function in PHP

Ankith Reddy
Updated on 27-Dec-2019 10:13:34

375 Views

The filter_var() function is used to filter a variable with a specified filter.Syntaxfilter_var(variable, filter, options)Parametersvariable − The name of variable.filter − The name of filter to get ID.options − Specifies options to use.ReturnThe filter_var() function returns filtered data on success, or false on failure.Example Live Demo

filter_var_array() function in PHP

George John
Updated on 30-Jul-2019 22:30:23

454 Views

The filter_var_array() function is used to filter multiple variables. Syntax filter_var_array(arrayname, parameters) Parameters arrayname − An array to filter the data. parameters − It specifies an array of filter arguments. Return The filter_var_array() function returns an array of values of the requested variables on success or false on failure. Example Live Demo The following is the output. Array ( [stname] => Jack [stmarks] => 95 [stemail] => jack@abcde.com )

filter_list() function in PHP

Chandu yadav
Updated on 27-Dec-2019 10:12:05

361 Views

The filter_list() function is used to list all supported filters.Syntaxfilter_list()ReturnThe filter_list() function returns an array of filters available. It returns an empty array if there are no filters.Example Live DemoOutputThe following is the output.int257 boolean258 float259 validate_regexp272 validate_domain277 validate_url273 validate_email274 validate_ip275 validate_mac276 string513 stripped513 encoded514 special_chars515 full_special_chars522 unsafe_raw516 email517 url518 number_int519 number_float520 magic_quotes521 callback1024

filter_input_array() function in PHP

George John
Updated on 30-Jul-2019 22:30:23

400 Views

The filter_input_array() function gets names of external variables and filters them optionally. Syntax filter_input_array(type, arraydefine, add_empty) Parameters type − There are five types of inputs to check i.e. INPUT_GET, INPUT_POST, INPUT_COOKIE, INPUT_SERVER, or INPUT_ENV. arraydefine − It specifies an array of filter arguments. It is optional. add_empty − If value is True, it adds missing keys as NULL to the return value. Return The filter_input_array() function returns an array containing the values of the variables on success, or false on failure. Example The following is an example that use the filter_input_array() function to filter POST ... Read More

filter_input() function in PHP

Ankith Reddy
Updated on 27-Dec-2019 10:24:27

495 Views

The filter_input() function gets a name of external variable and filters it optionally.Syntaxfilter_input(type, var, filtername, options)Parameterstype − There are five types of inputs to check i.e. INPUT_GET, INPUT_POST, INPUT_COOKIE, INPUT_SERVER, or INPUT_ENV.var − The name of variable.filtername − The name of filter to get ID.options − Specifies options to use.ReturnThe filter_input() function returns the value of the variable on success, false on failure, or null if the parameter of variable is not set.Example Live Demo

filter_id() function in PHP

Arjun Thakur
Updated on 27-Dec-2019 10:23:35

215 Views

The filter_id() function returns the filter ID of provided filter name.Syntaxfilter_id(filtername)Parametersfiltername − The name of filter to get the ID from.ReturnThe filter_id() function returns filter ID on success or FALSE, if the filter does not exist.ExampleOutputThe following is the output.int = 257 boolean = 258 float = 259 validate_regexp = 272 validate_domain = 277 validate_url = 273 validate_email = 274 validate_ip = 275 validate_mac = 276 string = 513 stripped = 513 encoded = 514 special_chars = 515 full_special_chars = 522 unsafe_raw = 516 email = 517 url = 518number_int = 519 number_float = 520 magic_quotes = 521 callback = 1024

Send email using Java Program

Rishi Raj
Updated on 30-Jul-2019 22:30:23

467 Views

To send an e-mail using your Java Application is simple enough but to start with you should have JavaMail API and Java Activation Framework (JAF) installed on your machine. You can download latest version of JavaMail (Version 1.2) from Java's standard website. You can download latest version of JAF (Version 1.1.1) from Java's standard website. Download and unzip these files, in the newly created top level directories you will find a number of jar files for both the applications. You need to add mail.jar and activation.jar files in your CLASSPATH. Send a Simple E-mail Here is ... Read More

Advertisements