Home : Products : DBMan : Customization :

Products: DBMan: Customization: Re: [JPDeni] Help with File Upload (upload graphics mod): Edit Log

Here is the list of edits for this post
Re: [JPDeni] Help with File Upload (upload graphics mod)
Okay, I'm hollering!

I need help with some of the logic...

(see attached for what I've hacked in so far - I've added all the other parts of the mod too, but I'm only posting the parts I'm tinkering with at the moment.)

1. I've added a "form" to the html_home sub so users can browse and select a file and then click a button that says "add record from file".

2. I've changed the submit part of the INPUT button to "validate_upload"

3. I've added the validate_upload line to the "main" sub in db.cgi to keep from getting an "unknown action" error

How does the "parse_form" sub fit in? Can I "call" it from validate_upload by adding &parse_form at the top of the validate_upload sub?

Also, I'm not sure what this line actually does:
if (($status eq "ok") && ($in{'Filename'})) { $status = &validate_upload; } #Validate Picture

It sets the value "status" to &validate_upload but not sure how that fits in.

Basically my users go to the "home" page, choose a file to upload, click add and are presented with a form in which parts (or all) of it are pre-filled based on the values in the file they uploaded. (I've got it working from "add_form", but I need to modify it to work from the "home" page).

If anyone is interested in the code for opening, reading and importing the data I'll be happy to share (it's only a few lines).

Last edited by:

Watts: Oct 11, 2005, 8:24 AM

Edit Log: