<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<?php
include './Conn.php';
$sv="select * from demo";
$qsv= mysqli_query($conn, $sv);
?>
<center>
<table border="1">
<tr>
<th>ID</th>
<th>NAME</th>
<th>NUMBER</th>
</tr>
<?php
while($rs= mysqli_fetch_assoc($qsv))
{
echo "<tr>";
echo "<tr><td>".$rs['did']."</td>
<td>".$rs['dname']."</td>
<td>".$rs['dcno']."</td>";
echo "<td><a href=del.php?did=".$rs['did'].">Delete</td></tr>";
echo "</tr>";
}
?>
</table>
</center>
</body>
</html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<?php
include './Conn.php';
$sv="select * from demo";
$qsv= mysqli_query($conn, $sv);
?>
<center>
<table border="1">
<tr>
<th>ID</th>
<th>NAME</th>
<th>NUMBER</th>
</tr>
<?php
while($rs= mysqli_fetch_assoc($qsv))
{
echo "<tr>";
echo "<tr><td>".$rs['did']."</td>
<td>".$rs['dname']."</td>
<td>".$rs['dcno']."</td>";
echo "<td><a href=del.php?did=".$rs['did'].">Delete</td></tr>";
echo "</tr>";
}
?>
</table>
</center>
</body>
</html>
=====================================================================
DEL.PHP
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<?php
// put your code here
include './Conn.php';
$did=$_REQUEST['did'];
$qde1="delete from demo where did='$did';";
//rdel=mysqli_query($Conn,$qdel);
if(mysqli_query($conn, $qde1))
{
echo "deleted";
header("Location:view.php");
}
else {echo mysqli_error($conn);}
?>
</body>
</html>
Comments
Post a Comment