Note that there are some explanatory texts on larger screens.

plurals
  1. POUploadify won't upload files to my php script!
    primarykey
    data
    text
    <p>I'm trying to get uploadify to send it's files to a php script but it comes back blank every time... i'm totally confused as sometimes it won't even attempt to upload the files.</p> <p>Form:</p> <pre><code>&lt;form action="upload.php?1" method="post" id="uploadForm" enctype="multipart/form-data"&gt; &lt;input type='file' name='uploadBox' id='uploadBox' /&gt;&lt;br/&gt; &lt;input class="button" type="submit" value="{Upload}" /&gt; &lt;script type="text/javascript"&gt; // makes the flash uploader work $(document).ready(function(){ $('#uploadBox').uploadify ({ 'uploader' : 'uploader.swf?PHPSESSID=4aa17bc8a50f8265ee27ec5fb469d7e5', 'script' : 'upload.ajax.php?PHPSESSID=4aa17bc8a50f8265ee27ec5fb469d7e5', 'cancelImg' : 'cancel.png', 'auto' : false, 'sizeLimit' : '8388608', 'buttonText' : "Browse", 'multi' : true, 'fileExt' : "*.jpg;*.jpeg;*.png", 'scriptData': {'album':"1", "session":"4aa17bc8a50f8265ee27ec5fb469d7e5"}, onError : function(event, queueID, fileObj, errorObj){ alert("ERROR"); console.log(errorObj); } }); $("#uploadForm .button").click(function(){ $("#uploadBox").uploadifyUpload(); console.log("uploading..."); return false; }); console.log("attached"); }); &lt;/script&gt; &lt;/form&gt; </code></pre> <p>And this is the upload.ajax.php file: Notes on it: it requires the session to be working for it to work and add_to_album does all the thumbnail work and stuff</p> <pre><code>&lt;?php // upload photos via background flash thingy mobob include "../../functions.php"; start($_REQUEST['PHPSESSID']); include "../../inc/photo.php"; // we need to upload this file we've got to the normal stuff we use :D if(!is_logged_in()){ echo "0"; exit; } $fail = false; foreach($_FILES as $file){ if(add_to_album($file['tmp_name'], $_REQUEST['album']) == false) $fail = true; } echo "upload has finished"; if($fail == true) echo "0"; else echo "1"; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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