how to use Blueimp jQuery file uploader with php?
===

I'm trying to implemen the Blueimp jQuery file uploader 
and am having a frustrating time making it work in my Php based site.

My main problem is with AJAX.
What I want to do is after uploading, 
1) it'd redirect to (let's say) abc.php.
2) after uploading(before redirecting page), I want to save the file name to mysql db.

I know how to handle db with php but don't know where I can't put my php codes.

for the first problem I guess I need to change main.js

$(function () {

    'use strict';

    // Initialize the jQuery File Upload widget:
    $('#fileupload').fileupload();

    // Enable iframe cross-domain access via redirect option:
    $('#fileupload').fileupload(
        'option',
        'redirect',
        window.location.href.replace(
            /\/[^\/]*$/,
            '/cors/result.html?%s'
        )
    );    
        // Load existing files:
        $('#fileupload').each(function () {
            var that = this;
            $.getJSON(this.action, function (result) {
                if (result && result.length) {
                    $(that).fileupload('option', 'done')
                        .call(that, null, {result: result});
                }
            });
        });
    

});


Thanks in million..