title: Add new elements to mysql with html
body: <p>I am trying to add new elements to my database on mysql through my webpage.</p>
  
  <p>This is what I've got so far</p>
  
  <pre><code>&lt;form action="MyCurrentPage.php" method="post" &gt;
     &lt;label for="playername"&gt; Player &lt;/label&gt;
     &lt;input type="text" name="addplayer" id="playername"/&gt;
     &lt;input type= "submit" value="submit" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>and this </p>
  
  <pre><code>&lt;?php
       if (isset($_POST['submit'])) {
          $addplayerv=$_POST['addplayer'];
          $mysqli-&gt;select_db("player", $player);
  
          $sql="INSERT INTO player (nameofplayer) VALUES ('".$addplayerv."')";
          $mysqli-&gt;query($sql, $mysqli);
          $mysqli-&gt;close($mysqli);
       }
  
  ?&gt;
  </code></pre>
  
  <p>The problem with this is that its not updating anything and I am not getting any errors.</p>