1

This is the jquery that i'm using.

I need to use the returned data and store it in a db usin php.

'onComplete'  : function(event, ID, fileObj, response, data) {

      alert('Your video has been uploaded. Thanks.');

Now inside this, i want to use the retuned fileOBJ and store it. How do i do that?

2
  • 2
    Please provide more context. Where is this callback being called from and after what kind of action? Commented Feb 18, 2011 at 20:13
  • 3
    You need to send the data via AJAX to a PHP script. Commented Feb 18, 2011 at 20:14

2 Answers 2

4

You could place an AJAX call inside of the function that submits the data to the php page.

'onComplete'  : function(event, ID, fileObj, response, data) {

  alert('Your video has been uploaded. Thanks.');

    $.ajax({
        type: 'POST',
        url: 'your_php_page.php',
        data: fileOBJ,
        success: function(msg) {
           //do something
        },
        error: function(msg) {
           //handle error
        }
    });
}

Then you'd simply create a php page that would submit the posted data to your database.

Read more about the $.ajax() call here.

Sign up to request clarification or add additional context in comments.

Comments

3

This technique is usually referred to as "Ajax" these days. The scope of your question is too broad to answer here, I recommend you do some reading on it.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.