I have a site that's using this script to upload a picture to my server. My server recently made changes and upgrades and now it's not working. I'd really appreciate if you could take a look and tell me if there are any problems with regards to PHP5: <?php $uploaddir = "folder/"; $ext="." .substr($HTTP_POST_FILES['Filedata']['name'],-3); do{ $rnd=mt_rand(); $uploadfile = $uploaddir . $rnd . $ext; }while(file_exists($uploadfile)); move_uploaded_file($HTTP_POST_FILES['Filedata']['tmp_name'],$uploadfile); echo "http://www.mysite.com/directory/folder/$rnd$ext"; exit(); ?> Code (markup): Any help is greatly appreciated. Thanks in advance.
I got the help I needed. I just needed to change the $HTTP_POST_FILES instances to $_FILES Thanks anyway for taking a look.