Click to See Complete Forum and Search --> : User file upload help


The Little Guy
10-25-2005, 09:07 PM
I was wondering how I could get this to happen:

1.) Users upload files to my site
2.) After upload, the site is instantly updated With
- File Name/Title
- Category
- Person's nave Who Submitted file (no registration needed) or just Annonomous for the name

I was thinking of making an animated greeting card place, where people could send animated greeting cards to other people in a variety of different categories:
- Birthday
- Anneversery
- New Baby
- and what ever else I can think of

Possibly as you saw above, I don't want users to sign up, but to just be able to upload files, and if they want have their name displayed (First and last Name, Just First Name, Just last name, Or no name). This would to be able to give the person credit for what they have done. To help keep files under control, I would like to have a "Report File To Moderator" or something like that, where I can review the file and decide wheter or not it should be deleted.
The format of the upload page wold have text feilds, a browse feild, and drop down menus, and the submit button, a fairly simple format.
A big question that I have is do I need to have a MySQL Database to do this? Could someone help me get started, by explaining this and to help point me into the right direction. As of now I am new to the PHP and MySQL world so help would greatly be apreciated.

Sheldon
10-25-2005, 09:21 PM
Yes you will need some sort of Database to do this, also some sort of image creation (http://www.hotscripts.com/PHP/Scripts_and_Programs/Image_Handling/index.html) script. Sort a database with your feilds i guess something like

Name
Filename
Category
(Date, IP, Email??)

Then set up one of the above scripts and your half done

The Little Guy
10-25-2005, 09:32 PM
Why an image script? these are swf files.

Sheldon
10-25-2005, 09:46 PM
Ok, sorry i missunderstood your post. I though you were making a site to generate the greating cards for other people. Not everyone adding files themselves.

Well thats easier then, just set up your site with all the forms, then we will give you help with teh php, adding to mySQL, renaming the files as they get uploaded i think would be a good idea, save problems later on, if you name them as a timestamp then that would always work.

Some to read up on would be...
http://php.inspire.net.nz/manual/en/function.move-uploaded-file.php
http://php.inspire.net.nz/manual/en/function.is-uploaded-file.php
http://dev.mysql.com/doc/refman/5.0/en/tutorial.html - start for mySQL
http://nz.php.net/features.file-upload - file uploads
http://htmlgoodies.com/tutorials/forms/ - i take it you no forms

Sheldon
10-25-2005, 09:48 PM
Also with some of te image generation scripts there are swf creation scripts there. Which means with a bit of work you not only could upload the cards but make them online two

The Little Guy
10-25-2005, 10:23 PM
what do you mean by make them online?

Sheldon
10-25-2005, 10:37 PM
Have a look at their scripts, upload an image embed words/test into the image or other images into it, Then you can use premade images of your sites, or just write "Happy B'Day Jayne" on a big picture of the sun or some thing

Have a look at a basic example
http://smiledsoft.com/demos/imgresize/demo.php