title: PHP upload files and give a custom name
body: <p>I am using this function to upload my files:</p>
  
  <pre><code>if ((($_FILES["Artwork"]["type"] == "image/gif")
  || ($_FILES["Artwork"]["type"] == "image/jpeg")
  || ($_FILES["Artwork"]["type"] == "image/jpg")
  || ($_FILES["Artwork"]["type"] == "image/pjpeg"))
  &amp;&amp; ($_FILES["Artwork"]["size"] &lt; 20000000))
    {
    if ($_FILES["Artwork"]["error"] &gt; 0)
      {
      //echo "Return Code: " . $_FILES["Artwork"]["error"] . "&lt;br /&gt;";
      }else{
        $imageName = $_FILES['Artwork']['name'];
        move_uploaded_file($_FILES["Artwork"]["tmp_name"],
        $path_image . $imageName);
        }
      }else{
      //echo "invalid file";
      }
  </code></pre>
  
  <p>How do I change <code>$imageName = $_FILES['Artwork']['name'];</code> with a custom name, but mantaining the file extension in the name, so for example: <code>myCustomName.jpg</code>?</p>
  
  <p>Thanks!</p>