Why is my php upload script not working when i export it in filezilla (other machines/server)?
<p>//This is a sample file upload. it works fine in my localhost but it didn't work in intranet..
//This is my codes</p>

<pre><code>&lt;?php require_once "../session.php" ?&gt;
&lt;?php
$host='localhost'; // My hostname
$username='root'; // Mysql username
$password='*******'; // Mysql password
$db_name='jobs'; // DB name

// Connect to server and select database.
mysql_connect($host, $username, $password)or die("Cannot Connect");
mysql_select_db($db_name);

// Where the file is going to be placed 
$TARGET_PATH = "uploads/";
// Get our POSTed variables
$uploadedfile = $_FILES['uploadedfile'];
// Sanitize our inputs
$uploadedfile['name'] = mysql_real_escape_string($uploadedfile['name']);

// Build our target path full string.  This is where the file will be moved do
// i.e.  images/picture.jpg
$TARGET_PATH .= $uploadedfile['name'];

/* Add the original filename to our target path.  
Result is "uploads/filename.extension" */
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']); 

if (move_uploaded_file($uploadedfile['tmp_name'], $TARGET_PATH))
{
    $sql = "update personal set resume='" . $uploadedfile['name'] . "' where username='".$_SESSION['name']."'";
    $result = mysql_query($sql) or die ("Could not insert data into DB: " . mysql_error());
    header("Location: ../scripts/view.php");
    exit;
}
else
    {
        echo "There was an error uploading the file, please try again!";
    }

?&gt;
</code></pre>

<p>This only works in my pc (localhost using wamp). :((</p>
