title: DropzoneJS: How to get PHP response after upload success?
body: <p>I'm trying to implement Dropzone on my site. I want to listen for the "success" event and then take the server response and add some info from it to a form on the same page as the DropZone after the upload is completed.</p>
  
  <p>the info i want to get in the server response is a direct link to the file.</p>
  
  <p>the website of dropzone: <a href="http://www.dropzonejs.com/">http://www.dropzonejs.com/</a></p>
  
  <p>my project website:</p>
  
  <pre><code>http://37.34.62.131/test/
  </code></pre>
  
  <p>so i completed this in a older version of my project but i cant figure it out how to do it with dropzone.js</p>
  
  <p>working example:</p>
  
  <pre><code>http://37.34.62.131/test/uploader%201.0/
  </code></pre>
  
  <p>what i try to do is when a file has been uploaded i want to get the php response back on the same page with the download links as shown below.</p>
  
  <p><strong>i can also send you my source codes so you can look for yourself.</strong></p>
  
  <p>my php code i want to see in the response:</p>
  
  <pre><code>        print '&lt;h2&gt;Picture Uploaded Successfuly!!!!&lt;/h2&gt; &lt;p id="codes"&gt;
  
        &lt;img src="'.$imgurl.'" height="300" alt="Uploaded Picture" &gt;
          &lt;label for="codebb"&gt;BBCode:&lt;/label&gt;
          &lt;input type="text" id="codebb" value="[URL='.$siteurl.'][IMG]'.$dlurl.'[/IMG][/URL]" onclick="javascript:this.focus();this.select();" readonly="true" /&gt;&lt;br /&gt;
          &lt;label for="codehtml"&gt;HTML Code: &lt;/label&gt;
          &lt;input type="text" id="codehtml" value=\'&amp;lt;a href="'.$siteurl.'"&amp;gt;&amp;lt;img src="'.$dlurl.'" alt="'.$alt.'" /&amp;gt;&amp;lt/a&amp;gt;\' onclick="javascript:this.focus();this.select();" readonly="true" /&gt;&lt;br /&gt;
          &lt;label for="codedirect"&gt;Direct Link:&lt;/label&gt;
          &lt;input type="text" id="codedirect" value="'.$dlurl.'" onclick="javascript:this.focus();this.select();" readonly="true" /&gt;&lt;/p&gt;';
          echo ".$newname";
  </code></pre>
  
  <p>Can anyone help me understand what I'm missing?</p>