PHP capabilities

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
comtek
Forum Commoner
Posts: 39
Joined: Tue Feb 17, 2004 10:46 pm

PHP capabilities

Post 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.
comtek
Forum Commoner
Posts: 39
Joined: Tue Feb 17, 2004 10:46 pm

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
comtek
Forum Commoner
Posts: 39
Joined: Tue Feb 17, 2004 10:46 pm

Post 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?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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)
comtek
Forum Commoner
Posts: 39
Joined: Tue Feb 17, 2004 10:46 pm

Post 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?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
comtek
Forum Commoner
Posts: 39
Joined: Tue Feb 17, 2004 10:46 pm

Post 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?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

any and all of those aren't a problem to filter through.
comtek
Forum Commoner
Posts: 39
Joined: Tue Feb 17, 2004 10:46 pm

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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)
Post Reply