title: Update where id=$id
body: <p>I have this query to submit data into the database:</p>
  
  <pre><code>$sql = "UPDATE table SET user='$user', name='$name' where id ='$id'";
  </code></pre>
  
  <p>the id will be obtained via url EX <code>localhost/index.php?id=123</code> </p>
  
  <pre><code>$id=$_GET['id']
  </code></pre>
  
  <p>The query will not work correctly; the data will not update.
  If I write :</p>
  
  <pre><code>$sql = "UPDATE table SET user='$user', name='$name' where id ='123'";
  </code></pre>
  
  <p>It works fine.</p>
  
  <p>If I echo the ID it will show the correct result, <code>123</code>.</p>
  
  <p>Where is the problem?</p>