THis is my html code i have checked multiple time but again its not working.
<form action="insert.php" method="POST">
        <input type="text" name="name"><br>
        <input type="text" name="fname"><br>
        <input type="submit" name=""><br>
    </form>
This is my php code i think code is correct but don't know its not working.
<?php
//include("php\DB.php");
$connection=new mysqli("localhost","root","","sms");
if($connection){
    echo "Connected";
}else{echo "Sorry";}
$username=$_POST["name"];
$fname=$_POST["fname"];
 $query="INSERT INTO student(name,fname)VALUES('".$username."','".$fname."')";
$connection->query($query);
?>
 
    