Skip to main content

DELL ES

<!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>
=====================================================================
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

Popular posts from this blog

SRCH OP

<!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. --> <?php ob_start(); ?> <html>     <head>         <meta charset="UTF-8">         <title></title>         <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">   <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>   <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>     </head>     <style>       body{           background-color: aliceblue;       }   </style>     <body>     ...

IMAGE UP BACK

<!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>         <style>             h1{                 font-family: monospace;                 color: black;                 text-align: center;             }             h3{                 text-align: left;             }         </style>     </head>     <body> ...