title: You have an error in your SQL syntax; check
body: <p>I keep getting this error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE username = 'username' VALUES ('value')' at line 1.
  The code is supposed to take the value that the logged in user enters into the form, and then insert that value into the money column of the table.</p>
  
  <pre><code> &lt;?php include("auth.php");?&gt;
  
   &lt;?php
  
   if(isset($_POST['submit']))
   {
  
  
   $getmoney = @mysql_query("INSERT INTO players (money) WHERE username = 
  '".$_SESSION['username']."' VALUES ('$_POST[amount]')")
   or die("Error: ".mysql_error());
  
  echo '
  &lt;div style="
    top: 395;
    left: 99;
    position: absolute;
    z-index: 1;
    visibility: show;"&gt;
   Money Received.
   &lt;/div&gt;
   ';
    }
    ?&gt;
  
    &lt;/head&gt;
    &lt;body&gt;
    &lt;p&gt;Bank&lt;/p&gt;
    Enter amount of money to recieve.&lt;br&gt;
    &lt;form action="bank.php" method="post"&gt;
    &lt;table border=2&gt;
    &lt;tr&gt;
    &lt;td&gt;Amount to Receive:&lt;/td&gt;&lt;td&gt;&lt;input type="text" name="amount" size="20px"&gt;&lt;/input&gt;    
    &lt;/td&gt;
    &lt;/tr&gt;
    &lt;/table&gt;
    &lt;input type="submit" name="submit" value="Get Money"&gt;&lt;/input&gt;
    &lt;/form&gt;&lt;br&gt;&lt;br&gt;
  &lt;hr size=2&gt;
  &lt;?php include("footer.php");?&gt;
    &lt;/body&gt;
    &lt;/html&gt;
  </code></pre>