Lab 6: PHP IV & MySQL II

Goals

Learn about how web applications can...

  1. Fetch and process data from a database.
  2. Implement forms to control databases.
  3. Insert data into databases.
  4. Remove data from databases.
  5. Edit data from databases.

Key Concept

By using HTML forms and the http request/response process, we can build accessible interfaces that can control databases.

Pre-lab

Pre-lab Reading (Learning PHP, MySQL, JavaScript, and CSS, 2nd Edition)

  • p 166
  • pp 172-185
  • pp 233-250

If you do not have the textbook, www.mysqltutorial.org/ and PHP MySQL Introduction are helpful resources.

Pre-lab Activity

Refer to the Pre-lab Reading to answer the Pre-lab Quiz in Blackboard.

In-lab

Preparation

  1. For file and folder names only use lowercase letters and never use spaces.
  2. Store all your files in your lab6 folder on the network drive

Connecting to web server via FTP

  • Hostname: ftp.sienasellbacks.com
  • Username: Your lastname @sienasellbacks.com
  • Password: Told to you in lab3
  • Settings: Use FTP; SFTP and SCP are not supported; If the option exists, use Passive FTP and IPv6

Setup

  1. Download and extract lab6.zip to your lab6 folder
  2. Listen to your instructor as he explains the purpose of all the files.
  3. Step-by-step we will implement scripts to find, delete, insert, and edit players.

Agenda

  1. functions.php
  2. home.php
  3. list_all.php
  4. find.php
  5. delete.php
  6. insert.php
  7. edit.php

Deliverables

  1. None.