PDA

View Full Version : [PHP] Upload style like in vBulletin


PET
07-21-2006, 12:02 AM
Hello people!

I have a major PHP problem and vBulletin is the single example I can give to other PHP programmers so thay will advise me. I know my post may seem hard to understand.

I have a page with a form. I put some text in the form and the thext is inserted into database. Simple.

Ok, on each ENTRY I want to add pictures. JPG files. I made the PHP script, I made thumbnails, etc.

This is my problem.

Imagne POST NEW REPLY from vBulletin like my form and a UPLOAD PICTURE link/button that will bring another page with a textfileld and a "browse" button. Like Manage Attachments from vBulletin.

What I want to do is, UPLOAD a picture, then refresh the main form window with a link to the picture, then upload another picture if I want, etc.

Got my point?

Do you have some sugestions? How can I do that? I repeat. The uploading It's done, thumbnails is done. I just don't know how to send the "file name" of the attached files to the form.

I manage a way but it's only for 1 file.

I open the form window.
Then open the upload window.
Upload a file.
Then the upload file name is send to a $_SESSION['upload']
THat SESSION the form will always see, and if it contains text, it will be inserded in the database with al the other form info.
This thing works, but I more uploads per "entry"
ThanksSee at the attachment. The page from the left is the form, the page from the right is the upload page.