Reply to Re: uploading several docs at once

Your name:

Reply:


Posted by Tim Hunt on 08/08/06 01:04

>
> "Chris" <designerNOSPAM@centurytel.net> wrote in message
> news:eaqptc$md$1@news01.intel.com...
> >I have a meetings section I'm developing on our intranet. Using PHP/MySQL.
> >Meeting info and Meeting docs reside on 2 related tables in the db. Users
> >may want to upload anywhere from 1 to 10 or more documents to share/use
> >during a meeting presentation. What would be the most efficient way to
> >approach this? This is the logic I'm currently considering:
> >
> > Page 1: Meeting Information input with link to a document upload page
> > (this page already exists as a link for 'New Meeting')
> > Page 2: Document upload page -
> > 1. should I pass the mysql_insert_id() from the meeting ID on the
> > previous page or
> > 2. provide a select box that lists last inserted meeting on top as well
> > as other meetings?
> > I'm considering this because a manager may want to upload a doc for
> > a meeting that they posted in the db earlier, but never got around to
> > uploading docs.
> > However, perhaps this should be an entirely different page to
> > upload docs for already posted meetings?
> > 3. should this page have several upload file inputs? If so, how many
> > is reasonable?
> > Page 3: Upload confirmation with a link ("add another doc for this
> > meeting") that reloads the page as a sticky form if not enough links
> >
> > Another possibility is to have it all on one page, but I can see that this
> > could get messy. I'm still new to PHP/MySQL so I have a hard time
> > following code that is used in only one page, but revealing only the
> > portion applicable. (i.e. if(submitted){do this} else {do that}. Seems
> > like sometimes it wants to show everything anyway.
> >
> > Just fishing for ideas here...
> >
> > Thanks,
> > Chris

Chris wrote:
> Well, I guess my question sounds stupid because no one answered it. I'm
> fairly new to this, I do understand uploading multiple files, my concern is
> getting them input into the database properly.

Sorry you didn't get a reply, it didn't sound stupid, maybe its just
that questions with an error message and a some code to debug are
quicker and easier to answer than brainstorming

Anyway I've got a coffee and some time free.

> I'm on a tight deadline to complete this
> project, so to save time re-writing code, I would just like some advice on
> the direction I should go with this - am I on the right track?

Yes I think you are.

> Is there
> already a concept out there so I don't have to re-invent the wheel?

Your plan to have seperate pages for adding meetings/uploading docs is
good and I'd do it that way too.

This way, like you said, the document upload page can be used when a
new meeting is added and also later when meetings have been added
already.

So.. have one document upload page and have two pages which will direct
the user (and submit a meeting id) to the documents upload page.

One way is when a new meeting is added - pass the insert_id to the
document upload page with something like '<a
href="/doc_upload?meet_id=' .mysql_insert_id() . '>'

The other way is after a meeting has already been added - have a
seperate 'choose meeting' page with just a select box of recently added
meetings which submits a meeting id to the document upload page. If the
<form method="get" action="doc_upload"> and the select name is
'meet_id' then one document upload page can be used for both ways.

> > Another possibility is to have it all on one page, but I can see that this
> > could get messy.

Yup, makes an editor with syntax highlighting look like a plate by
damien hirst

3. should this page have several upload file inputs? If so, how many
> > is reasonable?

Not sure, now ask how long some string is! (Just kidding) I guess a few
isn't enough but dozens is too many.

> > Page 3: Upload confirmation with a link ("add another doc for this
> > meeting") that reloads the page as a sticky form if not enough links

I've seen both and both work fine.

For example the file upload page in Hotmail has one file input with two
submit buttons, one button labelled 'Ok upload file', the other button
labelled 'Ok and upload another' ...In a cpanel clone I've seen the
multiple file inputs method with one button labelled 'Upload files'. Go
with whichever method you think is easiest or best.

Personally I found the multiple file input method marginally more
usable and its probably easier for you because you could cut n paste
the code from example 38-3 on
http://www.php.net/manual/en/features.file-upload.php

Cheers
Tim Hunt

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация