Forms and Databases Flashcards

1
Q

What do the method and action attributes do in a form?

A

method: used to transmit data supplied by user - default method is get
action: used to specify where the form data is to be transmitted. Typically a file that contains the necessary code for processing the form data, and generates the desired output and displays it

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

Which of the GET or POST methods is recommended?

A

POST is recommended

GET is the default

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

How do POST and GET get a response from the server?

A

POST - submits data to a web server, receives response

GET - asks server for a page or data

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

Where do POST and GET append/store data?

A

POST - stores data within body of the request. Does not append to the URL.

GET - appends the info entered by the user to the URL in the form of name-value pairs. This is called a query string.

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

When should GET and POST be used?

A

POST - when data is going to result in a change to the server’s database

GET - when forms won’t change user data

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

Which is more secure: POST or GET?

A

POST is more secure

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

Which can send large amounts of data: POST or GET?

A

POST

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

Which method should you use to send confidential or sensitive data: POST or GET?

A

POST

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

What is a Query String?

A

A set of parameters passed from a browser to a web server

Often passed by placing name/value pairs at the end of a url

PHP code on the server can examine and utilise the values of parameters

A way for PHP code to produce different output based on values passed from the user

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