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