Uploading files to a folder that is above the current folder
<pre><code>$result = mysql_query("SELECT * FROM media WHERE path = '$target'");
if($row = mysql_num_rows($result)==1)
{
echo"&lt;br /&gt;Sorry, there is already a file with that name on the server.&lt;br     /&gt;Please press back on your browser and save the file under a different name.";
}else{

if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target))
{
echo "The file ". basename( $_FILES['uploaded']['name']). " has been uploaded";
mysql_query("INSERT INTO media (id, related_page_id, type, title, copy, path, position, assets, time) VALUES ('', '$cat','$type','$name','','$target','$position','$id','$today')");

header("Location: edit.php?category=$cat");
exit();
echo $name;
}
else {
echo $today;
echo "&lt;br /&gt;";
echo "Sorry, there was a problem uploading your file. Please press back on your browser and try again.";
}
}
</code></pre>

<p>The above code used to work. Now it will not let me upload files to ../uploads/ but it works fine if i upload to uploads/.
Does anyone have any suggestions as to what i'm doing wrong? Thanks</p>

<p>EDIT</p>

<pre><code>$target = "../uploads/";
</code></pre>
