title: mkdir() File exists
body: <p>I am trying to create a new directory in the images folder when the email and password is sent, it retrieves the ID of the user and creates a folder in the images folder according to the users ID, however it is not working as I get this error: </p>
  
  <pre><code>Warning: mkdir(): File exists in C:\Users\authenticate.php on line 101
  </code></pre>
  
  <p>This is what I have tried and this is what it is giving a warning on:</p>
  
  <pre><code>  // Otherwise, the result variable passes on the confirm-email and the confirm-password to the login function
                 $result = $userVeri-&gt;login(strtolower($_POST["confirm-email"]), $_POST["confirm-password"]);
                 // The row variable stores the result
                 $row = $result;
                 // Then make a directory in the images folder with the new user id and give the folder all priveleges
                 mkdir('images/'.$row["id"],0777);
                 exit;
                 // Then display this message
                 echo '&lt;div class="alert alert-success"&gt;Congratulations! your account has been created. Please sign in.&lt;/div&gt;';
  </code></pre>
  
  <p>Does anyone understand what I am doing wrong?</p>
  
  <p>BTW it gives this warning even when their is no folder that exists in the images folder</p>