Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <h2>Note</h2> <p>Please, don't use <code>mysql_*</code> functions for new code. They are no longer maintained and the community has begun the <a href="http://goo.gl/KJveJ" rel="nofollow noreferrer">deprecation process</a>. See the <a href="http://goo.gl/GPmFd" rel="nofollow noreferrer"><strong>red box</strong></a>? Instead you should learn about <a href="http://goo.gl/vn8zQ" rel="nofollow noreferrer">prepared statements</a> and use either <a href="http://php.net/pdo" rel="nofollow noreferrer">PDO</a> or <a href="http://php.net/mysqli" rel="nofollow noreferrer">MySQLi</a>. If you can't decide, <a href="http://goo.gl/3gqF9" rel="nofollow noreferrer">this article</a> will help to choose. If you care to learn, <a href="http://goo.gl/vFWnC" rel="nofollow noreferrer">here is good PDO tutorial</a>.</p> <p>To see what error your code outputs change </p> <pre><code>mysql_query($query); </code></pre> <p>to</p> <pre><code>$result = mysql_query($query); if (!$result) { die('Invalid query: ' . mysql_error()); } </code></pre> <p>Then <a href="http://php.net/manual/en/function.mysql-error.php" rel="nofollow noreferrer"><code>mysql_error()</code></a> will output the error instead of just nothing ...</p> <p>As pointed out by <a href="https://stackoverflow.com/users/370940/lese-majeste">@Lèsemajesté</a> - <code>move_uploaded_file()</code> also returns a <code>boolean</code> which you should check is <code>true</code> :</p> <blockquote> <p>Returns TRUE on success.</p> <p>If filename is not a valid upload file, then no action will occur, and move_uploaded_file() will return FALSE.</p> <p>If filename is a valid upload file, but cannot be moved for some reason, no action will occur, and move_uploaded_file() will return FALSE. Additionally, a warning will be issued.</p> </blockquote> <p><a href="http://php.net/manual/en/function.move-uploaded-file.php" rel="nofollow noreferrer">Full docs for <code>move_uploaded_file()</code> here</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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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