title: mysql_real_escape_string () different behaviour on localhost and server, php5.1 , php5.4
body: <p>Before i call this question, yes i know mysql_query is a bad practice but i need to fix this first then in the near future i will move to PDO or something ok..</p>
  
  <p>I have a code that works perfectly in localhost using php 5.4 the problem is when i load it in server, everything works fine, there is just one error, that at this moment , im blind at it.</p>
  
  <p>On a description field, for a kind of articles in a blog, i use elrte and elfinder editor, the problem is when i send a image to store in de Database, i have different results.</p>
  
  <p>In local i do store the <code>&lt;img src="folder/ok/img.jpg"&gt;</code> but in the server for some reason the same files, and code store that in the database as <code>&lt;img src="\&amp;quot;/folder/ok/img.jpg\&amp;quot;" &gt;</code></p>
  
  <p>This must be related to this lines (the description file is going on <code>$desc</code>)</p>
  
  <pre><code>if(isset($_POST['submit'])){
  
              //protect and then add the posted data to variables
              $titulo = protect($_POST['titulo']);
              $desc = mysql_real_escape_string ($_POST['desc']);
              $cat_id = protect($_POST['cat_id']);
  </code></pre>
  
  <p>But can somebody explain this behaviour, cause im blind at this, also i know there are security issues on this, but well at least we are not storing any NASA info.</p>
  
  <p>hope anyone can help me on this </p>