Date: 11/10/99
- Next message: Kristian Köhntopp: "[PHPLIB] Re: phplib digest?"
- Previous message: Kristian Koehntopp: "Re: [PHPLIB] Looking for someone to write a specific cart() function for me."
- Maybe in reply to: Kristian Koehntopp: "Re: Re: [PHPLIB] input type file: oohforms"
- Reply: Kristian Köhntopp: "Re: [PHPLIB] input type file: oohforms"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>> Bob:
>> Here is a scenareo. You have a form page
>> ( generated with oohforms )and this page has
>> thirty form elements on it and 10 of those
>> elements are type="file".
>Kristian:
>This is very, very bad. Upon form submission not only the
>filenames, but the actual file contents are uploaded. If the
>form submission fails for some reason (any reason), all 10 files
>have been uploaded to the server for nothing. You should either
>accept and save these files and disable the file upload elements
>in the redisplay phase or seperate the file upload page from the
>rest of the form.
Ok, a very very bad thing.
So I'm taking your advice and will be saving ( keeping )
the good files on the server before the "complete" DB
INSERT is performed but this makes things a bit more
complicated:
The way I have it setup now is if every form element is
correct and all files pass the test, I move the files
to the appropriate directory and write a pointer in the DB
RECORD to those files.
But now if I follow your suggestion and save these files
( someplace ) before the actual DB insert is done, the script
has to:
1) Remember which files it saved and where they are...
2) Then when all other form data passes validation , the
script has to get the 'names' of files it saved in the TEMP
location and ...
3) Reinsert those file 'names' into the query string which is
generated from the form variables from the LAST
HTTP_POST_VARS array and...
4) Move those files ( the files that originally passed the
test when the others did not ) to a permanent location.
The main problem I have is how would I write the script
to remember which files passed the test when there is
a failed form submission? My fist Idea would be to start
passing around hidden variables...but would this be
a situation where I should register() the names of the
files ( and all other form element data ) that where
validated as 'ok'? Please explain.
...And what is the correct way to tell oohforms to NOT include
the variables (filenames that passed the test ) when
calling load_defaults($elements_list)?
Your help is very much appreciated.
Thanks,
Bob
PS: Could somone please explain oohforms Freeze() function?
In otherwords what is the difference between a static html
and a form wiget?
__________________________________________________
FREE Email for ALL! Sign up at http://www.mail.com
-
PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
the body, not the subject, of your message.
- Next message: Kristian Köhntopp: "[PHPLIB] Re: phplib digest?"
- Previous message: Kristian Koehntopp: "Re: [PHPLIB] Looking for someone to write a specific cart() function for me."
- Maybe in reply to: Kristian Koehntopp: "Re: Re: [PHPLIB] input type file: oohforms"
- Reply: Kristian Köhntopp: "Re: [PHPLIB] input type file: oohforms"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

