Compare commits
1 Commits
main
...
dev_histor
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
92ed1ad7c6 |
BIN
Logo.png
BIN
Logo.png
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB |
@ -21,8 +21,6 @@ if (isset($_POST["submit"])) {
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
@ -41,9 +39,6 @@ if (isset($_POST["submit"])) {
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<nav class="navbar navbar-light justify-content-center fs-1 mb-2" style="background-color: #add8e6;">
|
||||
<img src="Logo.png" alt="Logo" width="300" height="75">
|
||||
</nav>
|
||||
<nav class="navbar navbar-light justify-content-center fs-2 mb-4" style="background-color: #87CEEB;">
|
||||
CRUD Application
|
||||
</nav>
|
||||
@ -84,8 +79,8 @@ if (isset($_POST["submit"])) {
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button type="submit" class="btn btn-dark mb-3" style="background-color: #33b5fd;" name="submit">Save</button>
|
||||
<a href="index.php" class="btn btn-dark mb-3" style="background-color: #33b5fd;">Cancel</a>
|
||||
<button type="submit" class="btn btn-dark mb-3" style="background-color: green;" name="submit">Save</button>
|
||||
<a href="index.php" class="btn btn-dark mb-3" style="background-color: red;">Cancel</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
81
history-table.php
Normal file
81
history-table.php
Normal file
@ -0,0 +1,81 @@
|
||||
<?php
|
||||
include "index.php";
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<!-- Bootstrap -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
|
||||
|
||||
<!-- Font Awesome -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" integrity="sha512-iecdLmaskl7CVkqkXNQ/ZH/XLlvWZOJyj7Yy7tcenmpD1ypASozpmT/E0iPtmFIB46ZmdtAc9eNBvH0H/ZpiBw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||
|
||||
<title>CRUD History Application</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav class="navbar navbar-light justify-content-center fs-3 mb-5" style="background-color: #87CEEB;">
|
||||
CRUD History Application
|
||||
</nav>
|
||||
|
||||
<div class="container">
|
||||
<?php
|
||||
if (isset($_GET["msg"])) {
|
||||
$msg = $_GET["msg"];
|
||||
echo '<div class="alert alert-warning alert-dismissible fade show" role="alert">
|
||||
' . $msg . '
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
</div>';
|
||||
}
|
||||
?>
|
||||
|
||||
<table class="table table-hover text-center">
|
||||
<thead class="table-dark">
|
||||
<tr>
|
||||
<th scope="col">ID</th>
|
||||
<th scope="col">First Name</th>
|
||||
<th scope="col">Last Name</th>
|
||||
<th scope="col">Email</th>
|
||||
<th scope="col">Gender</th>
|
||||
<th scope="col">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
||||
<tbody>
|
||||
<?php
|
||||
$sql = "SELECT * FROM `crud`";
|
||||
|
||||
$result = mysqli_query($conn, $sql);
|
||||
while ($row = mysqli_fetch_assoc($result)) {
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $row["id"] ?></td>
|
||||
<td><?php echo $row["first_name"] ?></td>
|
||||
<td><?php echo $row["last_name"] ?></td>
|
||||
<td><?php echo $row["email"] ?></td>
|
||||
<td><?php echo $row["gender"] ?></td>
|
||||
<td>
|
||||
<a href="edit.php?id=<?php echo $row["id"] ?>" class="link-dark"><i class="fa-solid fa-pen-to-square fs-5 me-3"></i></a>
|
||||
<a href="delete.php?id=<?php echo $row["id"] ?>" class="link-dark"><i class="fa-solid fa-trash fs-5"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- Bootstrap -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4" crossorigin="anonymous"></script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@ -20,9 +20,6 @@ include "db_conn.php";
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav class="navbar navbar-light justify-content-center fs-1 mb-2" style="background-color: #add8e6;">
|
||||
<img src="Logo.png" alt="Logo" width="300" height="75">
|
||||
</nav>
|
||||
<nav class="navbar navbar-light justify-content-center fs-2 mb-4" style="background-color: #87CEEB;">
|
||||
CRUD Application
|
||||
</nav>
|
||||
@ -38,7 +35,7 @@ include "db_conn.php";
|
||||
}
|
||||
?>
|
||||
<a href="add-new.php" class="btn btn-dark mb-3">Add New</a>
|
||||
|
||||
<a href="history-table.php" class="btn btn-dark mb-3">History Table</a>
|
||||
<table class="table table-hover text-center">
|
||||
<thead class="table-dark">
|
||||
<tr>
|
||||
@ -63,8 +60,8 @@ include "db_conn.php";
|
||||
<td><?php echo $row["email"] ?></td>
|
||||
<td><?php echo $row["gender"] ?></td>
|
||||
<td>
|
||||
<a href="edit.php?id=<?php echo $row["id"] ?>"><i class="fa-solid fa-pen-to-square fs-5 me-3" style="color:#33b5fd;"></i></a>
|
||||
<a href="delete.php?id=<?php echo $row["id"] ?>"><i class="fa-solid fa-trash fs-5" style="color:#33b5fd;"></i></a>
|
||||
<a href="edit.php?id=<?php echo $row["id"] ?>" class="link-dark"><i class="fa-solid fa-pen-to-square fs-5 me-3" ></i></a>
|
||||
<a href="delete.php?id=<?php echo $row["id"] ?>" class="link-dark"><i class="fa-solid fa-trash fs-5" ></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
Loading…
Reference in New Issue
Block a user