Web Programming - Week 6 Flashcards

1
Q

What is the HTML action attribute for

A

Specifying where form data is sent to

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

HTML Form syntax

A

Name:<br></br>

<br></br>

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

What is the required input type attribute for

A

Making sure the user needs to fill that option

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

What is the input type pattern for all letters and digits

A

pattern=”[A-Za-z0-9]”

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

What are curly brackets used for in input type

A

Giving the minimum/maximum number of characters for an input

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

What attribute gives min/max number of characters for the password input type

A

minlength=”x” maxlength=”y”

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

What attribute gives the min/max number of numbers for the number input type

A

min=”x” max=”y”

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

What are the two form sending methods. How do they function

A

Get - Form data appended to action URL as query string

Post - Appends form data to body of the request

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

What is a query string

A

Input name and value followed by & sign

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

Get and Post contextual differences

A

Get can be bookmarked, not for sensitive data

Post cannot be bookmarked, for confidential data

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

What is the php command to get a value from form data

A

$_GET[‘name’], _POST and _REQUEST

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

What is the php isset function for

A

Checks whether a value has been assigned or not, returns false if no value

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

PHP Session and cookie functions

A

$_SESSION - Used to store data across pages

$_COOKIE - Used to identify a user

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