জয়েন লগইন

পিএইচপি delete

🌈পিএইচপি delete কি?

📋পিএইচপি delete হলো টেবিল থেকে তথ্য মুছে ফেলা পদ্ধতি।

⚒️পিএইচপি delete টেবিল থেকে তথ্য মুছে ফেলা ব্যবহৃত হয়।

পিএইচপি delete টেবিল থেকে তথ্য মুছে ফেলা উদাহরণ।

php
<?php

$connect = mysqli_connect("localhost", "root", "", "testing");
$select  = "SELECT * FROM users";
$delete  = "DELETE FROM users WHERE id=5";

mysqli_query($connect, $delete);

$data = mysqli_query($connect, $select);

echo "<table border='1'>";

echo "<tr>";
echo "<th>Id</th>";
echo "<th>Name</th>";
echo "<th>Land</th>";
echo "</tr>";

while ($cell = mysqli_fetch_assoc($data)) {

  echo "<tr>";
  echo "<td>" . $cell["id"] . "</td>";
  echo "<td>" . $cell["name"] . "</td>";
  echo "<td>" . $cell["land"] . "</td>";
  echo "</tr>";

}

echo "</table>";

?>