PHP works in a folder but not in another
<p>Ok, so I have made a form on a .html page and a .php page to upload an image and then save som data from the form along with the filepath for the image. The problem is when I move it from the root folder to root/backweb it wont work. I have created a new uploads folder in the backweb folder and also copied the conn.inc.php file over to the backweb folder for simplicity.</p>

<p>When I run it from the root foler it says "Releasen sparades!" (Release saved) but when I run it from the backweb server it says "Ogiltig filtyp!..." (Invalid filetype). Any ideas?</p>

<p>Here's the code:</p>

<pre><code>&lt;?
require_once 'conn.inc.php';

if (($_FILES["cover"]["type"] == "image/gif")
|| ($_FILES["cover"]["type"] == "image/png")
|| ($_FILES["cover"]["type"] == "image/jpeg")
|| ($_FILES["cover"]["type"] == "image/pjpeg"))
  {
  if ($_FILES["cover"]["error"] &gt; 0)
    {
    echo "Return Code: " . $_FILES["cover"]["error"] . "&lt;br /&gt;";
    }
  else
    {

    if (file_exists("uploads/" . $_FILES["cover"]["name"]))
      {
      echo $_FILES["cover"]["name"] . " finns redan på servern. ";
      }
    else
      {
      move_uploaded_file($_FILES["cover"]["tmp_name"],
      "uploads/" . $_FILES["cover"]["name"]);
      $cover = "uploads/" . $_FILES["cover"]["name"];
      }
    }
  }
else
  {
  echo "Ogiltig filtyp! Endast bilder &amp;auml;r till&amp;aring;tna (.jpg, .png och .gif)&lt;/br&gt;
  &lt;a href=\"uploadform.html\"&gt;F&amp;ouml;rs&amp;ouml;k igen&lt;/a&gt;";
  }


$band = $_REQUEST["band"];
$title = $_REQUEST["title"];
$catnum = $_REQUEST["catnum"];
$format = $_REQUEST["format"];

$query = "INSERT INTO releases (band,title,catnum,format,cover) VALUES ('$band','$title','$catnum','$format','$cover')";

$result = mysql_query($query);
    if ($result == NULL)
    {
        echo "N&amp;aring;got gick fel, releasen sparades ej!";
        ?&gt;
        &lt;br/&gt;
        &lt;br/&gt;
        &lt;a href="editreleases.php"&gt;Försök igen!&lt;/a&gt;
        &lt;?
    }
    else
    {
        echo "Releasen sparades!";
    }
?&gt;
</code></pre>
