title: Difference between htmlspecialchars and mysqli_real_escape_string?
body: <p>I read in a PHP book that it is a good practice to use <code>htmlspecialchars</code> and <code>mysqli_real_escape_string</code> in conditions when we handle user inputed data. What is the main difference between these two and where they are appropriate to be used? Please guide me.</p>