title: php mysql_real_escape_string conversion to mysqli
body: <p>Hi im currently learning php and mysql a tutorial i am following uses the now out of date mysql_real_escape_string ive read the manual on mysqli's version of it but just cant really figure out how i would do something like the code below.</p>
  
  <pre><code>$username = mysql_real_escape_string($POST['username']);
  </code></pre>
  
  <p>any help in converting this over to mysqli and any tips are greatly apreciated</p>