Hello.
I'm using AJAX for all the updates to the web site I'm building and it works very well. But now I face the need to:
1) Upload a file (an image or video) to a folder in the server.
2) Insert a row in MySQL with the name of the file plus some other information (year and a comment).
The user would upload the file and fill in the information in the same window, and should have a single message (if possible) saying that the file was added or not (meaning both the upload and the insert).
I have been doing some googling and found information as how to simulate and AJAX upload, since it seems AJAX does not support file uploads (hope I'm wrong). This is what I found:
http://www.anyexample.com/programming/php/php_ajax_example__asynchronous_file_upload.xml
So following that example I could upload the file, and I'd have all the information from the form, in the PHP, and I could synchronize the upload and the insert, but then I can't figure out how to send the OK from the PHP to a Javascript (i guess) to update the html and display the message in the web site. And anyway, is this the right approach to do what I need?
I'm a rookie in Javascript and AJAX, so I'd really appreciate any hint.