 <p>That should be an update query instead of an insert query:</p> <pre><code>mysql_query("UPDATE users SET profile = '$file' WHERE id = '$var'"); </code></pre> <p>Also note that:</p> <ul> <li>You're using a deprecated API. Consider switching to the <code>mysqli_*</code> functions or using PDO.</li> <li>You're wide open to SQL injection attacks. Consider using prepared statements.</li> </ul>