13 Replies Latest reply on Dec 22, 2007 2:16 PM by Greg Dove

    LoadVars() question

    udikeren Level 1
      i have the following php file in order to load and download images. the script includes "rename". and i need to have a variable in flash which will send the new name of the image. can someone give me a flash actionscript scrip?


      if (is_uploaded_file($_FILES['Filedata']['tmp_name'])) {
      $name = $_POST['name'];
      $uploadDirectory = "uploads/";
      $uploadFile = $uploadDirectory . basename($_FILES['Filedata']['name']);
      copy($_FILES['Filedata']['tmp_name'], $uploadFile);
      $path_parts = pathinfo($uploadfile);
      $extension = $path_parts['extension'];
      $uploadFilename = $uploadDirectory . $name . $extension;
      rename($uploadFile, $uploadFilename);