views:

137

answers:

1

I have this script

<?php

if (!empty($_FILES)) {
  $tempFile = $_FILES['Filedata']['tmp_name'];
  $targetPath = dirname(__FILE__) . $_POST['folder'] . '/';
  $pathinfoFile = pathinfo($_FILES['Filedata']['name']);
  $targetFile =  str_replace('//', '/', $targetPath) . uniqid() . '.' . $pathinfoFile['extension'];
  move_uploaded_file($tempFile, $targetFile); 
}

This script is from Uploadify, modified for saving the file with unique name. I need to save the temporary, unique and original names after the user has uploaded the file. These values will be used when the user finally submits the form. I have tried to save these values in $_SESSION but I'm having the problem outlined here:

http://uploadify.com/forum/viewtopic.php?f=5&amp;t=43 ,

I tried the solution from forum but it did not work, is there an easier way to solve this problem?

A: 

Sorry i tried one more time with $_POST['PHPSESSID'] and is working right now , thanks for help

mIRU