Saturday, 28 October 2006

Simple Album code

Here is a very basic photo album application implemented in PHP and MySQL with all sources in this zip file.

There is sample PHP code for doing some of the basic tasks in this application:
  • creating a member
  • editing a members details
  • adding a photograph
  • displaying photos
This implementation is very basic and you should identify shortcomings, select those that you will want to repair or new functionality to be added and then extend this base code (or write your own from scratch) .

I''ve made a few minor improvements to the sample code handed out in class:
  • A few more comments
  • Changed from $_GET[] to $_REQUEST[] as the array from which form data is accessed. This array includes data sent from a form either as method='get' or method='post'. Use get during testing and switch to post if necessary in production
  • dropped the MYSQL_ASSOC parameter - it's not necessary

No comments: