title: PHP: str_replace not working
body: <p>So, I have this code:</p>
  
  <pre><code> &lt;?php
      include '../config.php';
      $query=$_GET['q'];
      //replace
      echo str_replace('\','',$query);
  
      $sql=mysql_query($query) or die("Query not executed!");
      echo $query;
      echo "\n //executed";
  
      mysql_close();
  
      ?&gt;
  </code></pre>
  
  <p>The problem is on $_GET, for example when using <em>'</em> , example: "UPDATE users Set coins=3 WHERE username='admin' RETURNS: "update users set coins = 3 where username=<strong>\'admin\'</strong> <strong>=> should be 'admin'</strong> ""</p>