How to delete the item from table? I am using SESSION.

Joined
Jul 19, 2019
Messages
1
Reaction score
0
Here is my code :

PHP:
<html>
<head>

    <style type="text/css">
        table {
            border-collapse: collapse;
            border: 1px solid black;
        }
        table td,th {
            border: 1px solid black;
        }
        td {
            text-align: center;
        }
    </style>
</head>

<body>

    <h2>Play Lists</h2>

    <table>
        <th>Voice SKU</th>
        <th>Voice Name</th>
        <th>Action</th>
   

        <?php
       session_start();
      foreach ($_SESSION['playlist'] as $key => $value) {
        echo "<tr>";
        echo "<td>" . $key . "</td>\n<td>" . $value . "</td>";
        echo "<td>". "<button id='btn'>Delete</button>"."</td>";
        echo "</tr>";   
        }

        ?>
    </table>

</body>
</html>
output:

https://snag.gy/vOt9VX.jpg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top