Skip to main content
JustPaste
HomeAboutDonateContactTerms of UsePrivacy Policy

© 2026 Just Paste. All rights reserved.

Made with ❤️ by TakiDev

READ | JustPaste.app
Publish 23 days ago31 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>