Forms and Databases Flashcards Preview

Internet Applications And Techniques > Forms and Databases > Flashcards

Flashcards in Forms and Databases Deck (9)
Loading 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

2
Q

Which of the GET or POST methods is recommended?

A

POST is recommended

GET is the default

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

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.

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

6
Q

Which is more secure: POST or GET?

A

POST is more secure

7
Q

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

A

POST

8
Q

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

A

POST

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