title: PHP SQL Update Query syntax
body: <p>I'm working on my first PHP/MySQL project, and I've gotten basic logins and INSERT queries working, but not updates.  This is my first update, which is just one row with a state and zipcode.  Is anything wrong?</p>
  
  <pre><code>$dbc = mysql_connect("$host", "$username", "$password")or die("cannot connect");
  mysql_select_db("$db_name")or die("cannot select DB");
  
  $state=$_POST['state'];
  $zip=$_POST['zip'];
  
  $custnum = 0;
  $sql="UPDATE $tbl_name SET state = '$state', zip = '$zip', WHERE custnum = '$custnum'";
  $result = mysqli_query($dbc, $sql)
  or die('Error querying database.');
  </code></pre>