Search Header Logo

PHP: validazione lato server

Authored by Marco Buccione

Computers

9th - 12th Grade

Used 3+ times

PHP: validazione lato server
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

8 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

La validazione lato server avviene dopo quella lato client?

No

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

La funzione empty($nome) è vera se la variabile $nome...

...non è definita

...non è definita oppure è vuota

...vale 0

...è vuota

3.

DRAG AND DROP QUESTION

1 min • 1 pt

Componi il comando PHP che verifica se un testo è lungo almeno 10 caratteri:

​ if(​​ (a)   (​ (b)   ) ​ (c)   ​ (d)   ) {

// Qui facciamo qualcosa...

}

strlen
$nome
>=
10
strstr
length
>
<
9
<=

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In PHP, due date si possono confrontare?

Non si possono confrontare

Sì, come se fossero testi

Sì, come se fossero numeri

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

La funzione che verifica se una variabile è un numero si chiama:

is_numeric()

is_number()

is_decimal()

int()

6.

DRAG AND DROP QUESTION

1 min • 2 pts

Componi il comando PHP che verifica se $peso contiene un valore valido:

​ if(​​ ! (a)   ($peso) || ​ (b)   ​ (c)   0) {

// Qui va il messaggio di errore

}

is_numeric
$peso
<
strlen
empty
>
>=
peso
==

7.

FILL IN THE BLANKS QUESTION

2 mins • 2 pts

Completa il seguente comando, che deve verificare se $altezza, obbligatoria, è un numero ed è maggiore di 0:

if( (a)   ) {

// Messaggio di errore

}

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?