Professional Documents
Culture Documents
LAB10 PHP Arrays and Super Global Variables
LAB10 PHP Arrays and Super Global Variables
LAB10
PHP arrays and Super Global variables
Prepared By: Dr. Bassam Al-Shargabi
Objectives:
1. Declare and process PHP array
2. You learn how to collect data from forms and process this data using $_POST and $_GET
Task1]. Arrays
Declare array named Std_Course, this array hold two keys (Course,
Mark) with the following values php, 90 and do the following:
1- Print the content of this array using foreach loop statement.
2-Sort the content of this array based on keys and print content of this
array after sorting.
3- Sort the content of this array based on values and print content of
this array after sorting.
When the user click on submit the data is collected and passed to
webpage named process.php to be processed (Print)
IT@MEU University Web Application Development First Semester 2020/2021
[Task3]. Login
1- Design login.php page that allows user to enter username, and
password (required both input).
2- When the user click on login, the data sent to check.php. If username
is Ali and password is 123, and then the user is directed to
www.meu.edu.jo, otherwise the user must be directed to login.php.