title: I am unable to link my html forms to mysql table?
body: <p>I have created a forms page named "employee.php" for taking in user data. Also I have another file named SQLConnectionProcess.php which contains the code for linking forms in employee.php to sql table. The name of the database is "employee information" and the table's name is "employee info". I am using phpmyadmin and XAMPP for local server testing. </p>
  
  <p>employee.php code:</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  
  &lt;form name="EmployeeDatabase" action="SQLConnectionProcess.php" method="post"&gt;
  
  &lt;link rel="stylesheet" href="css.css"&gt;
  
  &lt;h1&gt;EMPLOYEE DATABASE&lt;/h1&gt;
  
  Employe Card NO: &lt;input type="text" name="cardNO" &gt;&lt;br&gt;&lt;br&gt;
  Employee NO: &lt;input type="text" name="employeeNO" &gt;&lt;br&gt;&lt;br&gt;
  Employee Name: &lt;input type="text" name="employeename"&gt;&lt;br&gt;&lt;br&gt;
  Nationality: &lt;input type="text" name="nationality"&gt;&lt;br&gt;&lt;br&gt;
  Profession: &lt;input type="text" name="profession"&gt;&lt;br&gt;&lt;br&gt;
  DOB: &lt;input type="text" name="DOB"&gt;&lt;br&gt;&lt;br&gt;
  DOJ: &lt;input type="text" name="DOJ"&gt;&lt;br&gt;&lt;br&gt;
  DOA(VisitVisa): &lt;input type="text" name="DOA"&gt;&lt;br&gt;&lt;br&gt;
  Company Code: &lt;input type="text" name="companycode"&gt;&lt;br&gt;&lt;br&gt;
  Sponsor Code: &lt;input type="text" name="sponsorcode"&gt;&lt;br&gt;&lt;br&gt;
  Visa Type: &lt;input type="text" name="visatype"&gt;&lt;br&gt;&lt;br&gt;
  Status: &lt;input type="text" name="status"&gt;&lt;br&gt;&lt;br&gt;
  
  &lt;input type="submit" name="formSubmit" value="Submit"&gt;
  
  &lt;/form&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>SQLConnectionProcess.php code:</p>
  
  <pre><code>if(isset($_POST['formSubmit'])){
    $cardNO= $_POST['cardNO'];
    $employeeNO= $_POST['employeeNO'];
    $employeename= $_POST['employeename'];
    $nationality= $_POST['nationality'];
    $profession= $_POST['profession'];
    $DOB= $_POST['DOB'];
    $DOJ= $_POST['DOJ'];
    $DOA= $_POST['DOA'];
    $companycode = $_POST['companycode'];
    $sponsorcode= $_POST['sponsorcode'];
    $visatype= $_POST['visatype'];
    $status= $_POST['status'];
    mysqli_connect('localhost','root','password','employee information');
    $sql = sprintf("INSERT INTO table_employee info(Employee Card NO,Employee NO,Employee Name,Nationality,Profession,DOB,DOJ,DOA(VisitVisa),Company Code,Sponsor Code,Visa Type,Status) VALUES ('','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s')",$cardNO,$employeeNO,$employeename,$nationality,$profession,$DOB,$DOJ,$DOA,$companycode,$sponsorcode,$visatype,$status);
    mysqli_query($sql);
  </code></pre>
  
  <p>But when I submit my forms from employee.php I get redirected to a new page which displays all the code in SQLConnectionProcess.php. I am unable to figure out the coding error. Kindly help me.....</p>