hello guys im having a hard time figuring how to delete data in database using php im using MYSQLI because mysql gives me warning i tried so many times but failed here is the code.HERE IS THE PICTURE:PICTURE ERROR
<!DOCTYPE HTML>
<html>
<head>
<style>
.wrap{
width:800px;
margin:0px auto;
}
form{
margin-left:200px;
}
a,a:visited{
text-decoration:none;
color:black;
}
</style>
</head>
<body>
<?php
require('connect.php');
if(isset($_POST['Submit'])){
$sid=$_POST['name'];
$sql = "DELETE scholars ". "WHERE sid = $sid";
$retval = $mysqli->query($sql,$mysqli );
if(!$retval )
{
die('Could not delete data: ' . $mysqli->error);
}
echo "Deleted data successfully
";
$mysqli->close( );
}
?>
<div class="wrap">
<form action="dscholar.php" method="POST">
<table>
<tr>
<td>ScholarID:</td>
<td><input type="text" name="name" required><td>
</tr>
<td><input type="submit" name="Submit" value="Delete Scholar"></td>
<td><button><a href="index.html">Back to Homepage!</a></button></td>
</tr>
</table>
</form>
</div>
</body>
</html>
HERE IS THE CONNECTION
<?php
$mysqli=new mysqli("localhost","root","","dblogin");
?>