Delete A Single Record From Database in PHP
<?php
include'dbconnect.php';
$id=$_GET['/'];
$sql= "delete from tbl_user where id={$id}";
$result_set= mysqli_query($con,$sql);
$count= mysqli_affected_rows($con);
if($count){
?>
<script>
window.alert("Student Information Deleted");
window.location.href="show.php";
</script>
<?php
}else{
?>
<script>
window.alert("Student Information Deleted")
window.location.href="show.php";
</script>
<?php
}
?>
0 Comments