title: PHP values not populating in sql database?
body: <p>I've got a simple form to take in user data and insert it into an sql database.  When the user hits submit it does create a new entry line (so I know it's connecting to the database) but none of the values are posting as they should. I was following the tutorials on w3schools but I'm not sure where my Values are getting lost. Could some one point me in the right direction?</p>
  
  <p>Form:</p>
  
  <pre><code>&lt;?php
  $Fname = $_POST["Fname"];
  $Lname = $_POST["Lname"];
  $Sid = $_POST["Sid"];
  $Email = $_POST["Email"];
  $Dtype = $_POST["Dtype"];
  $Mac = $_POST["Mac"];
  ?&gt;
  
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;Register School Device&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;form method="post" action="SMA_Send.php"&gt;
  First Name:&lt;input type="text" size="12" maxlength="20" name="Fname"&gt;&lt;br /&gt;
  Last Name:&lt;input type="text" size="12" maxlength="36" name="Lname"&gt;&lt;br /&gt;
  Student ID:&lt;input type="text" size="12" maxlength="12" name="Sid"&gt;&lt;br /&gt;
  Email:&lt;input type="text" size="12" maxlength="36" name="Email"&gt;&lt;br /&gt;
  Device Type:&lt;br /&gt;
  &lt;select name="Dtype"&gt;
  &lt;option value="iPad"&gt;iPad&lt;/option&gt;
  &lt;option value="iPhone"&gt;iPhone&lt;/option&gt;
  &lt;option value="AndroidTablet"&gt;Android Tablet&lt;/option&gt;
  &lt;option value="AndroidPhone"&gt;Android Phone&lt;/option&gt;&lt;/select&gt;&lt;br /&gt;
  Mac Address:&lt;input type="text" size="12" maxlength="36" name="Mac"&gt;&lt;br /&gt;
  &lt;input type="submit" value="submit" name="submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Send:</p>
  
  <pre><code>&lt;?php
  $servername = "localhost";
  $username = "username";
  $password = "password";
  $dbname = "dbname";
  
  // Create connection
  $conn = new mysqli($servername, $username, $password, $dbname);
  // Check connection
  if ($conn-&gt;connect_error) {
      die("Connection failed: " . $conn-&gt;connect_error);
  } 
  
  $sql = "INSERT INTO StudentDeviceReg (Fname, Lname, Sid, Email, Dtype, Mac, Date)
  VALUES ('$Fname','$Lname','$Sid','$Email','$Dtype','$Mac',NOW())";
  
  if ($conn-&gt;query($sql) === TRUE) {
      echo "New record created successfully";
  } else {
      echo "Error: " . $sql . "&lt;br&gt;" . $conn-&gt;error;
  }
  
  $conn-&gt;close();
  ?&gt;
  </code></pre>