Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>This will give you the basic idea of editing the json response from uploadhandler library,</p> <p><strong>EDITED:</strong></p> <p>In your uploadhandler.php library and change this line so that it will return the response,</p> <p><code>public function post($print_response = true)</code> to <code>public function post($print_response = false)</code></p> <p><code>public function get($print_response = true)</code> to <code>public function get($print_response = false)</code></p> <p><code>protected function initialize()</code> to <code>public function initialize()</code></p> <p><strong>EDITED:</strong> change this too <code>function __construct($options = null, $initialize = false, $error_messages = null)</code></p> <p>and in </p> <pre><code>function initialize() // case 'POST': return $this-&gt;post(); //Change this line like here break; //// case 'GET': return $this-&gt;get(); //Change this line like here break; // </code></pre> <p>Then in the function where you calling the library get the response back,</p> <pre><code>require('UploadHandler.php'); $upload_handler = new UploadHandler(); $response = $upload_handler&gt;initialize(); print_r($response); //Dump the response here and check $custom_arr = //Save all your custom variables here (DB insert id, Text etc) //Sample format of custom_arr //$custom_arr['insert_id'] = $mysql_primary_key_id; //$custom_arr['txt'] = $user_custom_text_field; // $response['custom_data'] = $custom_arr; echo json_encode($response); </code></pre> <p>In your front end you can use the <code>fileuploaddone</code> callback to get the data and play with it.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload