Note that there are some explanatory texts on larger screens.

plurals
  1. POJSON sending data through form
    text
    copied!<p>I bought the uploadifive script and want to change some things. I've added a textfield called "name" and a textfield called "about".</p> <p>The basic script that comes with Uploadifive is:</p> <p>the form:</p> <pre><code> &lt;form action="&lt;?php echo $domein.'/uploadstap2.php'; ?&gt;" method="post" name="THEFORM"&gt; &lt;input name="naam" type="text"&gt; &lt;div id="queue"&gt;&lt;/div&gt; &lt;input id="file_upload" name="file_upload" type="file" multiple&gt; &lt;a style="position: relative; top: 8px;" href="javascript:$('#file_upload').uploadifive('upload')"&gt;Upload Files&lt;/a&gt; &lt;/form&gt; </code></pre> <p>The script:</p> <pre><code>&lt;script type="text/javascript"&gt; &lt;?php $timestamp = time();?&gt; $(function() { $('#file_upload').uploadifive({ 'auto' : false, 'checkScript' : 'check-exists.php', 'queueID' : 'queue', 'uploadScript' : 'uploadifive.php', 'onUploadComplete' : function(file, data) { console.log(data); } }); }); &lt;/script&gt; </code></pre> <p>The creaters wrote the following on there webppage:</p> <blockquote> <p>A JSON object containing additional data to send to the server-side upload script. Data sent via this option will be sent via the headers and can be accessed via the $_POST array (if using the ‘post’ method). So if you send something like {‘someKey’ : ‘someValue’}, then you can access it as $_POST['someKey'].</p> </blockquote> <p>Dus, ik kan dit doen:</p> <pre><code>&lt;script type="text/javascript"&gt; &lt;?php $timestamp = time();?&gt; $(function() { $('#file_upload').uploadifive({ 'auto' : false, 'checkScript' : 'check-exists.php', 'formData' : {'someKey' : 'someValue'}, !!!!!!! &lt;&lt;&lt;&lt; this is what i just added &gt;&gt;&gt;&gt;!!!!! 'queueID' : 'queue', 'uploadScript' : 'uploadifive.php', 'onUploadComplete' : function(file, data) { console.log(data); } }); }); &lt;/script&gt; </code></pre> <p>But i need the value that people enter in "name" and "about" to be send on uploadComplete. How can i send this values in stead of: {'someKey' : 'someValue'}</p> <p>Can somebody help me?</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