Get new name of file after uploading it to server

Hi there

I want to upload multiple files. For this I used FileReference and it works fine. I m able to upload the files properly.

There is small problem:-

When i upload a file i change its file name from “pic1.jpg” to something like “asdfwer.jpg”

Now i want to get this new name of a file - so for that i set cookie using setcookie() in php. But the problem is “Cookie is not being set” I dont get the reason for that…for example

setcookie(“NewName”,“asdfwer.jpg”);

Basically i want to get the new name of a file in any way…setting cookie was just a trick to do that but unfortunately its not working

Please somebody can suggest a solution for this problem ???

Thanks a lot for any help in advance

Regards