As I start to get into the various files involved in setting up this site I am slowly realising that my innitial Design and Analysis Document is sadly lacking. Since submitting assignment 1 I have decided to base my site around much of what is presented in Ullman's Chapter 13 - Example - User Registration (2005, pp. 527-575). It covers a lot of what I wanted to include in my site, so i thought that would be the safest way to go. But I am now discovering that there is so much more in the way of file creation than I thought when I was preparing my Design Document.
Of course there are some aspects of his instructions which I won't need to use, and there are some things that I do want to use that he doesn't cover in this chapter. So it is a bit of give and take. But I thought I would highlight some of the changes or additions I will have to make here.
Header Template (header.html) - This is fairly straightforward as I covered it in earlier exercises. However, there are a couple of things that I needed to consider. At first I wasn't sure if I needed to use cookies or sessions, but after making some queries on the forum and doing some reading I will include the the sessions_start because i will be having users login and their information will need to be tracked by the server, which won't happen if I don't have sessions set up.
Footer Template (footer.html) - The footer coding in Ullman includes an option to login, logout, change password, and reset password. This is something that i had not considered innitially and will require me to create several more pages -
1. login.php - which is a separate login page. As I have the login table set-up on every page I have decided to just create a link back to the Home Page here, where they can enter their login details, rather than creating a whole new page for it.
2. forgot_password.php - This is for those users who have forgotten their password. I will keep this in, but am yet to understand fully how this works. This is an important page to have as it will offer an important service for the target audience (mostly over 60, poor memories, inexperienced Internet users etc.).
3. logout.php - This will be a fairly simple page to create as it will have a static message (tailored with the users name) on it. I will still include this.
4. change_password.php - I will include this page, but it will only be accessable when a person is logged in already.
**All these pages will be accessed via links across the bottom of every page and will be displayed according to whether a person is logged in or not (Ullman, 2005, p.530).
Configuration Scripts (config.inc.php) - This file will handle and display the errors. Innitially, as I set up the website, I will set it so that the errors will display on the web browser. When the site is complete I will set it up to notify me through email.
Database Script (mysql_connect.php) - This file sets up the database access information, creates the connection and sets up any specific functions needed to handle errors. As I have not yet attempted a connection I am still not sure how this happens, but will soon find out.
Home Page (index.php) - This page has been pretty standard as I have been through some of the earlier exercises which cover it.
Finally, as my site is not just a Registration site - unlike the excercise in Ullman - i will have a link to the registration page which will be separate to the Home Page, and it will not be mandatory to login before using the site. Anyone can use the site to browse for recipes. But to submit a recipe you must register and be logged in.