LESSON 6 Flashcards

1
Q

In PHP, there are two methods to handle form submissions:
Each method has its advantages and disadvantages, so it is crucial to choose the
appropriate one based on your needs.

A

GET and POST

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

These two are what we also call _. The are special types of variables because they can be accessed from any scope.

A

Superglobals

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

visible to everyone (all variable
names and values are displayed in the URL)
length restriction of GET method is
limited (about 2000 characters)
retrieve data from the address bar

A

GET

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

not visible in query parameters
no restriction
to securely pass sensitive and
confidential information

A

POST

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

function checks whether a variable is set, which means that it has to be declared and is not NULL. Look at the example at the right.

A

isset()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

is a “technical process where a web-form checks if the information provided by a user is correct.”

A

Form validation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Some examples of validation rules are:

A

Name
Contact Number
Email
Gender
Status

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Required. Must only contain letters,
numbers, and spaces.

A

Name

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Required/Optional. Must only contain numbers.

A

Contact Number

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Required/Optional. Must contain a
valid email address.

A

Email

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Required/Optional. Must only
choose one.

A

Gender

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Required/Optional. Must only
choose one.

A

Status

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Function which will tell you whether a string matches the pattern.

A

preg_match()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

to validate email in PHP.

A

filter_var()
FILTER_VALIDATE_EMAIL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly