first commit
This commit is contained in:
parent
f4329580fc
commit
2faf51b273
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
include "db_conn.php";
|
||||
include "db_conn-changes.php";
|
||||
|
||||
if (isset($_POST["submit"])) {
|
||||
$first_name = $_POST['first_name'];
|
||||
@ -12,7 +12,7 @@ if (isset($_POST["submit"])) {
|
||||
$result = mysqli_query($conn, $sql);
|
||||
|
||||
if ($result) {
|
||||
header("Location: index.php?msg=New record created successfully");
|
||||
header("Location: index-changes.php?msg=New record created successfully");
|
||||
} else {
|
||||
echo "Failed: " . mysqli_error($conn);
|
||||
}
|
||||
@ -41,7 +41,7 @@ if (isset($_POST["submit"])) {
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav class="navbar navbar-light justify-content-center fs-3 mb-5" style="background-color: #00ff5573;">
|
||||
<nav class="navbar navbar-light justify-content-center fs-3 mb-5" style="background-color: #87CEEB;">
|
||||
CRUD Application
|
||||
</nav>
|
||||
|
||||
@ -81,8 +81,8 @@ if (isset($_POST["submit"])) {
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button type="submit" class="btn btn-success" name="submit">Save</button>
|
||||
<a href="index.php" class="btn btn-danger">Cancel</a>
|
||||
<button type="submit" class="btn btn-dark mb-3" style="background-color: #33b5fd;" name="submit">Save</button>
|
||||
<a href="index-changes.php" class="btn btn-dark mb-3" style="background-color: #33b5fd;">Cancel</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@ -1,11 +1,11 @@
|
||||
<?php
|
||||
include "db_conn.php";
|
||||
include "db_conn-changes.php";
|
||||
$id = $_GET["id"];
|
||||
$sql = "DELETE FROM `crud` WHERE id = $id";
|
||||
$result = mysqli_query($conn, $sql);
|
||||
|
||||
if ($result) {
|
||||
header("Location: index.php?msg=Data deleted successfully");
|
||||
header("Location: index-changes.php?msg=Data deleted successfully");
|
||||
} else {
|
||||
echo "Failed: " . mysqli_error($conn);
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
include "db_conn.php";
|
||||
include "db_conn-changes.php";
|
||||
$id = $_GET["id"];
|
||||
|
||||
if (isset($_POST["submit"])) {
|
||||
@ -13,7 +13,7 @@ if (isset($_POST["submit"])) {
|
||||
$result = mysqli_query($conn, $sql);
|
||||
|
||||
if ($result) {
|
||||
header("Location: index.php?msg=Data updated successfully");
|
||||
header("Location: index-changes.php?msg=Data updated successfully");
|
||||
} else {
|
||||
echo "Failed: " . mysqli_error($conn);
|
||||
}
|
||||
@ -89,7 +89,7 @@ if (isset($_POST["submit"])) {
|
||||
|
||||
<div>
|
||||
<button type="submit" class="btn btn-success" name="submit">Update</button>
|
||||
<a href="index.php" class="btn btn-danger">Cancel</a>
|
||||
<a href="index-changes.php" class="btn btn-danger">Cancel</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
include "db_conn.php";
|
||||
include "db_conn-changes.php";
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
@ -20,7 +20,11 @@ include "db_conn.php";
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav class="navbar navbar-light justify-content-center fs-3 mb-5" style="background-color: #00ff5573;">
|
||||
<nav class="navbar navbar-light justify-content-center" style="background-color: #4682B4;">
|
||||
<img src="logo.jpeg" alt="Logo" width="400" height="100">
|
||||
</nav>
|
||||
|
||||
<nav class="navbar navbar-light justify-content-center fs-3 mb-5" style="background-color: #87CEEB;">
|
||||
CRUD Application
|
||||
</nav>
|
||||
|
||||
@ -34,7 +38,7 @@ include "db_conn.php";
|
||||
</div>';
|
||||
}
|
||||
?>
|
||||
<a href="add-new.php" class="btn btn-dark mb-3">Add New</a>
|
||||
<a href="add-new-changes.php" class="btn btn-dark mb-3" style="background-color: #33b5fd;">Add New</a>
|
||||
|
||||
<table class="table table-hover text-center">
|
||||
<thead class="table-dark">
|
||||
@ -60,8 +64,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"] ?>" 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>
|
||||
<a href="edit-changes.php?id=<?php echo $row["id"] ?>"><i class="fa-solid fa-pen-to-square fs-5 me-3" ></i></a>
|
||||
<a href="delete-changes.php?id=<?php echo $row["id"] ?>"><i class="fa-solid fa-trash fs-5"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
@ -73,7 +77,5 @@ include "db_conn.php";
|
||||
|
||||
<!-- 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>
|
||||
BIN
logo.jpeg
Normal file
BIN
logo.jpeg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 36 KiB |
Loading…
Reference in New Issue
Block a user