views:

691

answers:

1

I am using class.upload.php to handle an image upload from a form that submits employee details to a MySQL database. class.upload.php does EXACTLY what I want it to do, resize the image and rename it - what I am now trying to accomplish is to upload via Ajax after the user selects the file and then display it in the form while they continue entering details. How would this best be accomplished with jQuery?

A: 

I have used Uploadify to serve this purpose on several websites. It works quite well once you get the hang of it.

Nathan Taylor
This will prove to be VERY useful but it's not really what I am looking to do.. at least not with its standard implementation. I forgot to mention that I need to retain the name of the uploaded file somewhere in the form, either in the upload box or in a hidden field, so that it can be added to the MySQL entry. Right now, without any fancy Ajax, the image is being resized, renamed to employeelastname_employeefirstname.jpg, and inserted into the record (filename).
Benjamin
The functionality you explain is well within the bounds of Uploadify's capabilities. Uploadify can be used to send the file to your server using AJAX to which your server can respond asynchronously with any data it may generate upon handling the upload. I suggest taking a look at some of the samples to get a feel for what works best. In any case, I'm sure you can continue to use the upload script you already have with only some minor accommodations.
Nathan Taylor
Thanks, I'll look further into Uploadify.. this will really be handy when I move on to photo galleries.. :)
Benjamin