title: How to Insert multiple rows of data into a table
body: <p>I am currently new to programming over all and I have all sorts of questions when it comes to PHP, but my first question is how to add multiple data to a table only using one variable. For example:</p>
  
  <pre><code>&lt;?php
  $mysqli = mysqli_connect('localhost', 'root', 'testpass', 'testdatabase')
  or die (mysqli_error());
  
  $test = "INSERT INTO test (test1, test2) VALUES ('test1', 'test2')";
  $test .= "INSERT INTO test (test1, test2) VALUES ('test3', 'test4')";
  
  if (!$test){
    echo "Sorry but you information could not be added...";
  }
  else {
    $test_result = mysqli_query($mysqli, $test);
    echo "Your data has been entered!";
  }
  </code></pre>
  
  <p>When I use this code when trying to add multiple data into my table it doesn't work. I can only add in 1 row at a time. I can never add in 2, 3, or more rows in at a time. Is there an error in my code? When I look at other example, people user mysql and not mysqli. The people using mysql use that same code as I have above. I prefer using mysqli and not having to switch because of something that is so small. Back to my question, how do I add multiple rows of data into a table? Thanks!</p>