Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There's a list of errors here.</p> <pre><code> $image = $_FILES['myprofilepicture']; </code></pre> <p>This will just assign an array to your $image variable. It will not give you a filename as expected. You need <code>['tmp_name']</code> at least, but ought to move it elsewhere first. See <a href="http://www.php.net/manual/en/features.file-upload.post-method.php" rel="nofollow noreferrer">http://www.php.net/manual/en/features.file-upload.post-method.php</a></p> <p>Your query also lacks quotes around the interpolated string:</p> <pre><code> $query=mysql_query("UPDATE Registered set myprofilepicture=$image where myusername='$showusername'"); </code></pre> <p>Such your query will become <code>set myprofilepicture=Array</code> at best. But you need <code>myprofilepicture='/tmp/Whatever'</code>.</p> <p>And lastly, you are invoking mysql_query() twice. Either you assign the SQL command only to your $query variable:</p> <pre><code> $query = "UPDATE Registered ..."; </code></pre> <p>Or remove the second <code>mysql_query</code> in the <code>if</code>.</p> <p>And then you can't mix in <strong><code>mysqli</code></strong><code>_insert_id</code>, when you used mysql_ functions before.</p> <p>Don't forget to apply <a href="http://php.net/mysql_real_escape_string" rel="nofollow noreferrer"><code>mysql_real_escape_string()</code></a> on all interpolated strings, if you want to keep using this <a href="https://stackoverflow.com/questions/12859942/why-shouldnt-i-use-mysql-functions-in-php">dated database interface</a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload