filter_has_var()
(funzione PHP) verifica se esista una variabile di un certo tipo di input (get
, post
, ecc.). Restituisce un valore booleano.
tips&tricks
Sintassi
filter_has_var($tipo, $variabile)
parametro | descrizione |
---|---|
$tipo | Il tipo da verificare, che può avere i seguenti valori testualiINPUT_GET INPUT_POST INPUT_COOKIE INPUT_SERVER INPUT_ENV
|
$variabile | La variabile da processare |
Esempi
[url]/test.php?a=1 echo filter_has_var(INPUT_GET, 'a'); // true
Contenuti correlati
- CSS
- HTML
- JavaScript
- jQuery
- PHP
- SQL
- WORDPRESS
0 Comment