title: How to rename the uploaded files in PHP
body: <pre><code>extract($_POST);
  $error=array();
  $extension=array("jpeg","jpg","png","gif");
  foreach($_FILES["files"]["tmp_name"] as $key=&gt;$tmp_name) {
      $file_name=$_FILES["files"]["name"][$key];
      $file_tmp=$_FILES["files"]["tmp_name"][$key];
      $ext=pathinfo($file_name,PATHINFO_EXTENSION);
  
  move_uploaded_file($file_tmp,"".$_POST['property_builder']."/".$_POST['property_city'].""."/".$_POST['property_location'].""."/".$_POST['property_type']."/".'Images-'.$_POST['property_name']."/".$file_name);
  
  
  $content_to_write .= '&lt;img src="Images-'.$_POST['property_name'].'/'.$file_name.'" alt="'.$file_name.'" title="'.$file_name.'" height="400" width="600"&gt;';
  }
  </code></pre>
  
  <p>In the above code, I am unable to rename the uploaded files.. Please help me out as how to rename all the uploaded files by user... </p>
  
  <p>User, just uploads 5 files, I want 5 text boxes asking for 5 filenames.. and save them accordingly.</p>