Class 8 – Process Flows for In-Class Assignment

Posted: April 4th, 2009 | Author: | Filed under: assignments, php | Tags: | No Comments »

Here are diagrams that represent the flow of data for today’s in-class assignment.  There are flow diagrams for the Register Process, Login Process, and Image Upload Process.

Registration Process Flow

Registration Process Flow

Login Process Flow
Image Upload Process Flow

Image Upload Process Flow

As a side-note, there are a total of nine files you will need to make this work:

  1. index.php – the home page that displays all the images
  2. upload.php – the form to upload an image
  3. process_upload.php – the script that does the image uploading
  4. register.php – the form for users to register a new account
  5. process_register.php – the script that does the registration
  6. login.php – the form for users to log into the site
  7. process_login.php the script that does the login
  8. users.txt – the text file that holds all the usernames and passwords
  9. images.txt – the text file that holds all the image paths, captions, and usernames

The format for the users.txt file should have one line for each user.  Each line is divided into two fields: username,password.  So an example file would look like:

amos,webdev
jack,jpax2009
marjorie,mk19387

And the format for images.txt should have one line for each image.  Each line will have three fields: image path, caption, and username.  For example:

files/image1.jpg,this is the first image,amos
files/image2.jpg,this is the second image,jack
files/image3.jpg,this is the third image,marjorie

No related posts.



Leave a Reply