Page 1 of 1

PHP capabilities

Posted: Wed Jan 05, 2005 3:36 pm
by comtek
Is it possible to have a page that would automatically display the "browse" window on a page as opposed to clicking on a Browse button and opening up a Browse window.

What I would like to be able to do is have a form that inputs data into a database. Most of the data would just be text. Some of this data would have to be links to image files... usually 3-5 document images per database entry. I would like to have the page display the browse window on the screen to automatically list the directory where the scanned images are located and be able to click on the image file and have the location automatically entered into the form. I would like to be able to click on the image file and have it populate the first empty image field automatically, then the second, third and fourth, etc.

I hope all this makes sense and is possible. Thanks.

Posted: Wed Jan 05, 2005 3:40 pm
by comtek
In case it makes a difference... the image files would be scanned and saved to a LAN. This is for an in-house project to eliminate some of our paper documents and be able to search for and display document images.

Posted: Wed Jan 05, 2005 3:43 pm
by feyd
that's typically not possible without some real fun work, or ActiveX. An alternative to using the file upload system is to create the image browser in the page through the server loading all the images from that directory onto the page and allow the person to select from there.

Posted: Wed Jan 05, 2005 3:51 pm
by comtek
can't do that, there will be too many. We will need to be able to search for customers via the information entered into the form such as firstname, lastname, dob, etc, and then display that customers record along with the document that go along with them.

What about just having a "browse" button beside each image field and letting the browse window open up? Can you make it so that selecting a file only puts the location of the file so only the link will be added to the database?

Posted: Wed Jan 05, 2005 3:58 pm
by feyd
with a properly functioning browser, you'll only recieve the filename (along with the binary data).. something that can be done is reading the field with Javascript to extract the path only. As long as the file form fields themselves aren't in the form, the browser won't upload the files. But that requires Javascript to be on and allow reading of the file fields.

I'd still advise doing a thumbnail gallery for the selection. You can pre-filter it given some of the information they already supply by that point (might need to rearrange some of it to get the filtering information)

Posted: Wed Jan 05, 2005 4:16 pm
by comtek
How efficient would a thumbnail gallery be if we have 2000 customer records each containing 3-5 image files? How would you pre filter it?

Posted: Wed Jan 05, 2005 4:26 pm
by feyd
only so many pictures show per page. This minimizes the download requirement for the client machine, along with how many records need finding at a time.

Posted: Wed Jan 05, 2005 4:35 pm
by comtek
The office workers would only be looking for one client at a time as needed to verify signature, dob, or whatever. Would they be able to filter by firstname, lastname, ss#, dob or something close?

Posted: Wed Jan 05, 2005 4:41 pm
by feyd
any and all of those aren't a problem to filter through.

Posted: Wed Jan 05, 2005 4:47 pm
by comtek
can you recomend any scripts that might do the job or be modified to do what I need?

Oh, by the way, thanks for you help so far, it has been very informative and helpful.

Posted: Wed Jan 05, 2005 5:09 pm
by feyd
it's relatively simple:

Code: Select all

select * from your_table where firstname like '%$first_partial%' OR lastname like '%$last_partial%' OR ssn = '123456789' OR dob = '1969-07-20'
the query can easily vary depending on what information the work supplies, what features you want to support (like partial name searching through worker input wildcards)