It looks like you're new here. If you want to get involved, click one of these buttons!
$dsPath = substr( getcwd(),0,strlen(getcwd())-( strlen($dsCONF['DIR']['ADMN'])+1 ) ) . '/'. $dsCONF['DIR']['PIC'] . '/';
$dsImgName = $ds->dsAdmin->dsUpload('Filedata',$dsPath,FALSE); // uploading the file then returning the generated name
If (!$dsUpErr && $dsImgName<>'None') { // if the image has been uploaded, store its name in the session
$_SESSION['dsImgL'] = $dsImgName;
}
If you want to get to variables set in upload.php use the "response" facility to echo a string that you can parse in your calling file.
<?php
session_start();
$id = session_id();
echo "<script language='JavaScript'>
$(document).ready( function () {
$('#file_upload').uploadify({
'uploader' : 'uploadify/uploadify.swf',
'script' : 'uploadify/uploadify.php',
'cancelImg' : 'uploadify/cancel.png',
'folder' : 'uploads',
'multi' : true,
'method' : 'post',
'scriptData' : { 'PHPSESSID': '".$id."'},
'auto' : true,
'fileExt' : '*.jpg;*.gif;*.png;*.php',
'fileDesc' : 'Image Files (.JPG, .GIF, .PNG, .PHP)',
'queueID' : 'custom-queue',
'queueSizeLimit' : 1,
'simUploadLimit' : 1,
'removeCompleted': false,
'onSelectOnce' : function(event,data) {
$('#status-message').text(data.filesSelected + ' files have been added to the queue.');
},
'onAllComplete' : function(event,data) {
$('#status-message').text(data.filesUploaded + ' fichiers envoyés, ' + data.errors + ' erreurs.');
}
});
});
</script>";
?>
<div class="upload">
<div id="status-message">Select some files to upload:</div>
<div id="custom-queue"></div>
<input id="file_upload" type="file" name="Filedata" />
</div>then in uploadify.php