[ Enter the Past ] Vienna - Austria, 8-12 April 2003
 

ID_person: 2
ID_paper: 2 (workshop)

Organiser: Tyler Bell/Yegor Veter
Oxford ArchDigital Ltd.

Getting Archaeology online: Using PHP and MySQL to develop dynamic WebPages

Proposal
Oxford ArchDigital Ltd. (OAD) proposes to give a practical, 'hands-on' workshop at CAA02 on programming dynamic web pages in PHP and accessing data in a MySQL database. OAD provides courses in PHP and MySQL to archaeological students and professionals at its offices in Oxford.

We have provided here an outline of our regular course - this will be trimmed as time allows, ideally as a one-day session at the minimum.

Demand

Although first created to display static text, the web has since become the premiere medium for the dissemination of database content. Great numbers of these dynamic or database-driven websites are appearing thanks in part to the advent of a easy and free scripting language called PHP, frequently used in hand with an extremely powerful database called MySQL. Together, these two open source solutions allow those with limited programming experience to create extremely sophisticated and powerful dynamic websites that allow users to query, edit, add and delete information over the web. This course provides an introduction to the PHP programming language, a brief introduction to using MySQL databases, and general advise on the design and development of secure and efficient data-driven web applications.

Course Objectives

The course aims to provide a practical introduction to the PHP programming language - a popular and powerful scripting language used to create dynamic (database driven) web pages. Using archaeological datasets, the course will focus on the elements of the language used to connect and retrieve information from an online database, and display that information in formatted HTML for delivery over the web. Following the instructor's examples, students will be asked to write code that performs specific functions, such as working through arrays, printing formatted HTML text, or retrieving a record sets from a database. As the course progresses, the student will combine these functions to create a fully-functional web site that interacts with the contents of a MySQL database, allowing users to search, add, edit and delete records. Students will be able take the code they write during the course with them on a floppy disk, providing them with ready-to-use tools for future application development. Note that although the course will be working with MySQL, it does not provide instruction in the administration of MySQL databases.

Target Audience

The course is intended for those with some programming experience, but not necessarily in PHP. Prospective students should be comfortable in a programming environment, be familiar with arrays, if/then statements, variables, and functions. The student must have a working knowledge of HTML, especially HTML forms, and would benefit from a familiarity with SQL, although this is not essential.

Content

This course will cover:
· What are dynamic web pages, and when to use them
· Introduction to PHP and web scripting languages
· How PHP, MySQL and the webserver work together
· Working with PHP variables and arrays
· Online help and development resources
· Using environment variables
· HTML Forms and getting data from the client
· Decision making (if/then/else, switch statements)
· Validating data from the client
· Mathematical operators
· Debugging: handling and avoiding errors
· Working with loops and arrays
· Working with Date and Time
· Defining and calling custom functions
· Documenting and organising your code
· Using cookies and sessions
· Security
· Attaching to a MySQL database
· Querying a database with SQL
· Displaying the results of a query in HTML
· Creating Advanced SQL
· Working with passwords
· Introduction to object-oriented coding: classes, properties and instances
· Create your own website: input, delete and edit database records

 
 

[gor]22-01-2003