JustPaste
HomeCategoriesAboutDonateContactTerms of UsePrivacy Policy
JustPaste

Free online notepad — write and share instantly

Navigate

  • Home
  • Timeline
  • Categories

Info

  • About
  • Donate
  • Contact

Legal

  • Terms of Use
  • Privacy Policy

© 2026 JustPaste.app. All rights reserved.

Made with ♥ by JustPaste

READ | JustPaste.app
5 months ago57 views

READ

<?php include 'connection.php'; ?>

<!DOCTYPE html>

<html>

<head>

<title>PHP CRUD</title>

</head>

<body>

<h2>User List</h2>

<table border="1" cellpadding="10">

<tr>

<th>ID</th>

<th>First_Name</th>

<th>Middle_Name</th>

<th>Last_Name</th>

<th>Section</th>

<th>Action</th>

</tr>

<?php

$result = mysqli_query($conn, "SELECT * FROM student");

while ($row = mysqli_fetch_assoc($result)) {

?>

<tr>

<td><?= $row['id'] ?></td>

<td><?= $row['first_name'] ?></td>

<td><?= $row['middle_name'] ?></td>

<td><?= $row['last_name'] ?></td>

<td><?= $row['section'] ?></td>

<td>

<a href="edit.php?id=<?php echo $row['id']; ?>">Edit</a> |

<a href="delete.php?id=<?php echo $row['id']; ?>"

onclick="return confirm('Are you sure you want to delete this record?');">

Delete

</a>

</td>

</tr>

<?php } ?>

</table>

</body>

</html>

← Back to timeline