title: PHP/MYSQL Update query not working
body: <p>Can anyone tell my why this update query is not working?</p>
  
  <pre><code>if ($_GET['update']) {
  include 'config.php';
  //Connect to MYSQL Database server
  $connect = mysql_connect(DB_HOST, DB_USER, DB_PASS) or die("Could not connect to MYSQL Database.");
  $result = mysql_select_db(DB_NAME, $connect) or die("Could not connect to MYSQL table.");
  
  mysql_query("UPDATE contact SET read = 1 WHERE id = '$_GET[update]'")or die("Query failed.");
  echo "Update works!";
  } else {
  echo "Update does not work...ughh.";
  }
  </code></pre>
  
  <p>Thank you in advance.</p>
  
  <p>Edit: I got the query to work. For anyone who was worrying about the security, I was using this script as a test to see if I wanted to use it. I just added the security now that the script works. Thank you all for the help and tips.  </p>