lab 9 · 2019-11-03 · case-sensitive only first statement will display value because the other...
TRANSCRIPT
Lab 9
By James Sager – Oct 15, 2017
CS486T
Forms
Functions
ECHO and PRINT
PHP Syntax
Outlines
01
02Php Variables
03
04
05
PHP Syntax
PHP Syntax
Case-sensitive
Only first statement will display value because the other statements are treated as three different variables.
Comment
Echo statement
Print statement
Examples
Example
Example
If..Else
Switch..
Function
Note: A function name must start with a letter or an underscore. Function names
are NOT case-sensitive.
Example
Example
Complete the following:
Notice:• that at the start of the script, we check whether the form has been submitted using
$_SERVER["REQUEST_METHOD"]. • If the REQUEST_METHOD is POST, then the form has been submitted - and it should be
validated. • If it has not been submitted, skip the validation and display a blank form.
• All input fields are optional.
What to do at home
Try to use “upload” in this source:
https://www.w3schools.com/php/php_file_upload.asp