title: Warning: mysqli_query() expects parameter 1 to be mysqli boolean given
body: <p>After submitting something through my form I get the welcome part and then the mysql connection error because mysql is off, it goes away when I turn it on and then the boolean  error. "Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given in C:\xampp\htdocs\welcome.php on line 25"</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  Welcome &lt;?php echo $_POST["name"]; ?&gt;&lt;br&gt;
  Your email address is: &lt;?php echo $_POST["email"]; ?&gt;&lt;br&gt;
  Your password is &lt;?php echo $_POST["password"]; ?&gt;&lt;br&gt;
  You have purchased the &lt;?php echo $_POST["sub_type"]; ?&gt;
  &lt;?php
  $mysqli_host = "localhost";
  $mysql_username = "root";
  $mysql_password = "123";
  $site_db = "test";
  $info_name = $_POST["name"];
  $info_pass = $_POST["password"];
  $info_email = $_POST["password"];
  $sub_type = $_POST["sub_type"];
  
  $con=mysqli_connect($mysqli_host,$mysql_username,$mysql_password,$site_db);
  // Checks connection to twitch webpanel database and inserts registreation info
  if (mysqli_connect_errno());
  {
  echo "Failed to connect to MySQL: " . mysqli_connect_error();
  }
  
  mysqli_query($con,"INSERT INTO Users (Username, Password, Email, Subcription)
  VALUES ('$info_name', '$info_pass', '$info_email', '$sub_type')");
  
  ?&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>