Website Slogan

PHP Unit 2 Exercise 1

⚬ Introduce HTML form processing using server-side PHP processing & return of HTML values
⚬ Students create a server-side PHP application using their “local” Apache web server to read values sent by the client browser from Unit1_Ex3 HTML form elements back to the browser to display
1. input: get data from the keyboard or from some file or other device
2. output: write / display information
3. math: perform some calculations, like addition and multiplication
4. conditional execution: check some condition and execute one sequence of statements or another
5. repetition: repeat some sequence of operations, usually with some variation

For this assignment, we are required to use our work from Unit 1 Exercise 3, except for now we output the results to a php page. I will be linking this assignment as a PDF. It includes both options I selected, as well as the output.

PHP Demo (Opens in a new tab.)



PHP Unit 2 Exercise 2

⚬ Understand basic PHP programming fundamentals
⚬ Students create a website with a set of server-side PHP demonstrations using their “local” Apache web server and then post the website to their remotely hosted web server

In this example we start getting into some PHP programming. I will be using screen captures for displaying the data.

PHP Programming Fundamentals (Opens in a new tab.)



PHP Unit 2 Exercise 3

⚬ Understand basic PHP classes & objects
⚬ Students create a new PHP_Classes website that combines their code from their Unit2_Ex1 Form Processing & Unit1_Ex2 “Programming Fundamentals” assignment with a new set of PHP classes & objects demonstration they create on their “local” Apache web server and then post the new LstF_PHP_Demo website to their remotely hosted web server

This example is a bit hard to show, as it will just show Names and some text. I will be linking my source code and output in the link below to a PDF file.
Classes and Objects (Opens in a new tab.)



PHP Unit 2 Exercise 4

⚬ Understand the login process for web servers
⚬ Understand “sessions” using PHP
⚬ Students create an HTML form with textboxes, check boxes, & radio buttons and create a PHP login page which accepts the variables entered / selected by the user & sets server-side session variables then allows the user to display the stored session variables from a separate PHP page
⚬ Students post their PHP Sessions website to their remote PHP/MySQL website & test it

For this exercise, we were required to use 3 pages in order to have a session. The first page is using the form tags, which once hitting submit saves the selected options into a session. The second page just says welcome guest as there is no official login. Page 3 tells the user who they are logged on as, in this case guest and prints their selected options to the page.

Sessions Example (Opens in a new tab.)