title: Should I use mysqli_real_escape string() or mysql_real_escape_string() for form data?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3665572/mysql-escape-string-vs-mysql-real-escape-string">mysql_escape_string VS mysql_real_escape_string</a>  </p>
  </blockquote>
  
  
  
  <p>I need to get company_name (given by user through a form) entered into my mysql database.
  When I use </p>
  
  <pre><code>$company = mysqli_real_escape_string($_POST['company_name'])
  </code></pre>
  
  <p>I get an error</p>
  
  <pre><code>Warning: mysqli_real_escape_string() expects exactly 2 parameters, 1 given in     /opt/lampp/htdocs/Abacus-Version-2/admin/Company/insert_company.php on line 58
  </code></pre>
  
  <p>But everything seems to fine while using</p>
  
  <pre><code>$company = mysql_real_escape_string($_POST['company_name'])
  </code></pre>
  
  <p>What can I do in such cases?</p>