$_SESSION not available when using jqUploader

raja811

New Member
I am using PHP and jQuery for an uploader. I am having a huge problem though and would like some input as to how best handle these two together.I am using a PHP session variable that I am using to change the filename after the jquery uploader has finished. The jquery "url" is pointing to a PHP function that handles the actual upload. When I use the jquery uploader to upload an image, the session variable is never available. I'm assuming because the uploader itself is not using a session.How can I resolve this issue? I need to have that session variable to change the filename.EDIT: I am using jqUploaderHere is the code\[code\]function jqUploadPhoto( ){ $picSize = '50550500'; $picDir = '/photos'; $temp = $_FILES['uploadfile']['name']; ... substr()... convert old name to new name $file = $_SESSION['name'].$ext; // This is set and can be echoed when this func is used from a browser. Not available in JQ if (move_uploaded_file($_FILES['uploadfile']['tmp_name'], $file) == false){ // This dies because the filename isn't available. echo 'NOTOK'; }}\[/code\]
 
Back
Top