View Single Post
Old Oct 30th, 2004, 12:24 PM   #1
nickk
Newbie
 
Join Date: Oct 2004
Posts: 4
Rep Power: 0 nickk is on a distinguished road
Hello,

I have been writing PHP scripts for quite some time now, but nothing big, just basic site navigation stuff, guestbooks, etc. I have a problem with making anything "bigger" which requires different parts to work together well.

I was recently asked to code the "brain" behind my school's yearbook website. I have been making a plan of how the whole application is going to work, and I wanted to post my ideas so maybe some more experiences PHP users can give me some advice.

Now the idea behind the website is that between 250 and 350 students are able to upload a piece of text (no bigger than maybe 2 or 3 medium sized paragraphs), and a photo. The text/photos should be displayed neatly online, and should be made available in .txt format (for the text pieces) for the publisher to use for the physical yearbook. There should also be a section where parents, etc. can upload a small message which will go into the yearbook.

My plan is the following: have 5 tables =>
[ul][li]1 table for each class (there are 4)[/li]
[li]1 table for the parent's comments section[/li][/ul]

Each "class" table will have the following:
[ul][li]ID[/li]
[li]Name[/li]
[li]Text[/li]
[li]Photo[/li][/ul]

When a student submits their text + photo, the script gives them the ID of the last student + 1, saves their text in the MySQL table, and in a .txt file with the name of their ID. Same thing happens with the photo. it is saved under ID.jpg (where ID is the student's ID), and in the photo field in the table, it simply saves the location of the photo.

With the tables + seperate files it should be easy to display the information for each student comfortably, and for the publisher to extract the information for the physical book.

Any idea/comments/suggestions welcome, and I would be very greatful for any help I get.

Thanks, Nick.
nickk is offline   Reply With Quote