title: Send form to DB using HTML and PHP (MSSQL)
body: <p>I need to send data to the SQL Server from a HTML form using PHP.
  The script to open the connection works, but being SQL Server not MySQL it's a bit hard to find a good example to INSERT data into the table.</p>
  <p>Tried several methods, but none works.
  Some examples:</p>
  <pre><code>&lt;?php
  $query = &quot;
     INSERT INTO dbo.facturi_achizitii 
        (tip, MBxxx, xxx_key, Document, Reference, doc_xxx_text, doc_date, xxx_date, Customer, Business_xxx, xxx_jurnal, valoare_xxx, tax_b_amount, output_xxx) 
     VALUES 
        ('$tip', '$MBxxx', '$xxx_key', '$Document', '$Reference', '$doc_xxx_text', '$doc_date', '$xxx_date', '$Customer', '$Business_xxx', '$xxx_jurnal', '$valoare_xxx', '$tax_b_amount', '$output_xxx')&quot;;
  $params1 = array($tip, $MBxxx,$xxx_key, $Reference, $doc_xxx_text, $xxx_date, $xxx_date, $Customer, $Business_xxx, $xxx_jurnal, $valoare_xxx, $tax_b_amount, $output_xxx);
  $stmt = sqlsrv_query( $conn, $sql, $params);
  if( $stmt === false ) {
       die( print_r( sqlsrv_errors(), true));
  }
  ?&gt;
  </code></pre>
  <p>What is wrong with it? Thank you</p>