PHP Fundamental Examples
All of these use PHP code
Show Me

Example Code

Math

User inputs a number, a function symbol, and another number, then submits. The server will process the user's input and calculate the equation given by the user.

Conditional Execution

User answers multiple choice questions, then submits. The server will process the user's input and tell the user how many questions were answered correctly and how many were answered incorrectly.

Repetition

User inputs there name, then submits. The server will count the letters in their name, without counting any spaces, and will tell the user the number of letters in their name.

Indexed Array

User inputs item names into text boxes, then submits. The server will output the item names in the order they were entered.

Associative Array

User selects the food items they like, then submits. The server will output the items they selected, or something else if they selected none.

OlsD_OOP_Demo

A demo that uses a class file to set and get properties.

OlsD_PHP_Sessions

A demo that sets user input as session variables, then outputs those variables from another page.

OlsD_Display_Table

A demo that displays a MySQL database table.

OlsD_PHP_MySQL_Login

A demo that allows a user to login to by using a database for storage of the username and password.

CIS 266

CIS 266