Web Programming - Week 6 Flashcards
What is the HTML action attribute for
Specifying where form data is sent to
HTML Form syntax
Name:<br></br>
<br></br>
What is the required input type attribute for
Making sure the user needs to fill that option
What is the input type pattern for all letters and digits
pattern=”[A-Za-z0-9]”
What are curly brackets used for in input type
Giving the minimum/maximum number of characters for an input
What attribute gives min/max number of characters for the password input type
minlength=”x” maxlength=”y”
What attribute gives the min/max number of numbers for the number input type
min=”x” max=”y”
What are the two form sending methods. How do they function
Get - Form data appended to action URL as query string
Post - Appends form data to body of the request
What is a query string
Input name and value followed by & sign
Get and Post contextual differences
Get can be bookmarked, not for sensitive data
Post cannot be bookmarked, for confidential data
What is the php command to get a value from form data
$_GET[‘name’], _POST and _REQUEST
What is the php isset function for
Checks whether a value has been assigned or not, returns false if no value
PHP Session and cookie functions
$_SESSION - Used to store data across pages
$_COOKIE - Used to identify a user