Jump to content

Recommended Posts

Hey, I have this programming exercise for school. I dont think it is too difficult, the problem is, ist has to be completely in OOP, and I have never done anyOOP PHP in my life. Ok here it goes:


[b]Step 01:[/b]

Create a HTML/PHP Webform to upload files. The files should be stored in a temporary Directory on the Server. The directory should be able to be defined by an administrator.

The File should be checked if it is in binary- or text-format. Binary Files aren't allowed, and if one attemtps to upload them, they should get an error message.


[b]Step 02:[/b]

List the lines of the Textfile in Input Fields. a One Line Input Field for each line of text. The User should be able to edit the data in the Input fields, before they are imported into the database via a buttonclick. The Lines should belong to an entry of that textfile.

[b]Step 03:[/b]

After the Import, display the textlines out of the imported File. The Lines should be generated out of the database.

This Procedure of Uploading, Editing, Importing and Displaying should be able to be done more than once. Please keep that in Mind when designing your database. The Combination of Line and File should always be recognizable, and as an added Information the time and date of the Import.



[b]Other Rules:[/b]

- please document your classes and functions
- Use the template Engine [a href=\"http://smarty.php.net\" target=\"_blank\"]http://smarty.php.net[/a]
- Javascript based plausibility checks arent allowed
- Please use PHP version 4 and MySQL version 4.1
- The Script should be easy to install for anybody, therefore all required parameters should be stored in a seperate config file
- Create Classes for: Database Access, Input checking, File Handling, PHP Input Parameters Handling($_REQUEST cannot be used in the actual Program File, only in the class)
- please send us the SQL Statements for creation of the database tables







Please help me, I dont expect someone to code the entire thing for me, but at least a roadmap please.

thanks
Have you written ANY part of this yet to show us?

No offense, but the road map is already there, ie....

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]
Step 01:
A. Create a HTML/PHP Webform to upload files.
(1) do you know how to create a very simple html form?
(2) do you know how to get the information from the form?
(3) do you know how to modify the form to accept file uploading?

B. The files should be stored in a temporary Directory on the Server.
(1) do you know how to have php create a folder/directory?

C. The File should be checked if it is in binary- or text-format. Binary Files
aren't allowed, and if one attemtps to upload them, they should get an
error message.
(1) do you know how to check a files's type?
[/quote]

do it in small increments. each one being as self contained as possible.

Keep us posted.

Lite...
[!--quoteo(post=377556:date=May 27 2006, 08:52 AM:name=litebearer)--][div class=\'quotetop\']QUOTE(litebearer @ May 27 2006, 08:52 AM) [snapback]377556[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Have you written ANY part of this yet to show us?

No offense, but the road map is already there, ie....
do it in small increments. each one being as self contained as possible.

Keep us posted.

Lite...
[/quote]

Hey Lite,

Yes I know how to do all of that. Well Actually, checking if it is binary or text could be a small problem, but I'm guessing its checkable via the $_FILE array. However I am having problems with doing it in OOP.
Thanks for that link Lite, I am reading it right now.

To be more clear on the type of help I am looking for, since I just read over my post and it seemed like I just wanted someone to code it for me:

Some resources on OOP PHP besides the one posted by Lite, and maybe a tutorial on how object oriented programs are built. Ever read the book "Build your own Database Driven Website with PHP and MySQL" ? Thats the book that helped me learn PHP in the first place. He gave a little theory of PHP and mySQL in the beginning, and then jumped straight into applying it to real situations. Thats the type of material I need to really understand programming concepts.

There is no doubt that I could learn this on my own given enough time, but I got the assignment on friday and it has to be done by monday.
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.