title: Uploading image files to subdomain
body: <p>I have an admin subdomain set up:</p>
  
  <blockquote>
    <p>admin.mysite.co.uk</p>
  </blockquote>
  
  <p>And a 'main' site:</p>
  
  <blockquote>
    <p>www.mysite.co.uk</p>
  </blockquote>
  
  <p>On the admin site I want to upload images to the main site, so the upload scripts etc. exist on the <em>sub</em>domain yet the file is uploaded to the main domain.</p>
  
  <p>This code works OK for uploads to the <em>admin</em> subdomain:</p>
  
  <pre><code>$target_file = 'images/carousel/' . basename($_FILES["imageFile"]["name"]);
  
  if (move_uploaded_file($_FILES["imageFile"]["tmp_name"], $target_file)) {
      echo "The file ". basename( $_FILES["imageFile"]["name"]). " has been uploaded.";
  } else {
      echo "Sorry, there was an error uploading your file.";
  }
  </code></pre>
  
  <p>So, what path do I drop in here:</p>
  
  <pre><code>$target_file = 'images/carousel/' . basename($_FILES["imageFile"]["name"]);
  </code></pre>
  
  <p>To get it to upload the main domain ?</p>
  
  <p>Is this even possible ?</p>