title: php move-uploaded-file is setting the address as the name of the file
body: <p>I have two completely similar codes that one of them works and the other doesnt</p>
  <pre><code>$id = 1;
  $ext = pathinfo($_FILES['adminProfilePicture'][&quot;name&quot;], PATHINFO_EXTENSION);
  $address = '../img/admin' . $id . 'image.' . $ext;
  move_uploaded_file($_FILES['adminProfilePicture'][&quot;tmp_name&quot;],$address);
  </code></pre>
  <p>this code works perfectly and saves the file in the directory root/img/admin1image.png</p>
  <pre><code>$id = 1;
  $ext = pathinfo($_FILES['teamProfilePicture'][&quot;name&quot;], PATHINFO_EXTENSION);
  $address = '../img/team' . $id . 'image.' . $ext;
  move_uploaded_file($_FILES['teamProfilePicture'][&quot;tmp_name&quot;],$address);
  </code></pre>
  <p>but this code for some reason sets the address as the name of the file
  and saves a file with this name (../img/team1image.png) in the directory root/(../img/team1image.png)</p>
  <p>i really dont know what could be wrong<br />
  any help would be appreciated<br />
  and one other thing is the code works on my localhost
  but iam making a project for someone else and this problem occurs on his host</p>