first commit
This commit is contained in:
parent
f4329580fc
commit
2faf51b273
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
include "db_conn.php";
|
include "db_conn-changes.php";
|
||||||
|
|
||||||
if (isset($_POST["submit"])) {
|
if (isset($_POST["submit"])) {
|
||||||
$first_name = $_POST['first_name'];
|
$first_name = $_POST['first_name'];
|
||||||
@ -12,7 +12,7 @@ if (isset($_POST["submit"])) {
|
|||||||
$result = mysqli_query($conn, $sql);
|
$result = mysqli_query($conn, $sql);
|
||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
header("Location: index.php?msg=New record created successfully");
|
header("Location: index-changes.php?msg=New record created successfully");
|
||||||
} else {
|
} else {
|
||||||
echo "Failed: " . mysqli_error($conn);
|
echo "Failed: " . mysqli_error($conn);
|
||||||
}
|
}
|
||||||
@ -41,7 +41,7 @@ if (isset($_POST["submit"])) {
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<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
|
CRUD Application
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
@ -81,8 +81,8 @@ if (isset($_POST["submit"])) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<button type="submit" class="btn btn-success" name="submit">Save</button>
|
<button type="submit" class="btn btn-dark mb-3" style="background-color: #33b5fd;" name="submit">Save</button>
|
||||||
<a href="index.php" class="btn btn-danger">Cancel</a>
|
<a href="index-changes.php" class="btn btn-dark mb-3" style="background-color: #33b5fd;">Cancel</a>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@ -1,11 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
include "db_conn.php";
|
include "db_conn-changes.php";
|
||||||
$id = $_GET["id"];
|
$id = $_GET["id"];
|
||||||
$sql = "DELETE FROM `crud` WHERE id = $id";
|
$sql = "DELETE FROM `crud` WHERE id = $id";
|
||||||
$result = mysqli_query($conn, $sql);
|
$result = mysqli_query($conn, $sql);
|
||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
header("Location: index.php?msg=Data deleted successfully");
|
header("Location: index-changes.php?msg=Data deleted successfully");
|
||||||
} else {
|
} else {
|
||||||
echo "Failed: " . mysqli_error($conn);
|
echo "Failed: " . mysqli_error($conn);
|
||||||
}
|
}
|
||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
include "db_conn.php";
|
include "db_conn-changes.php";
|
||||||
$id = $_GET["id"];
|
$id = $_GET["id"];
|
||||||
|
|
||||||
if (isset($_POST["submit"])) {
|
if (isset($_POST["submit"])) {
|
||||||
@ -13,7 +13,7 @@ if (isset($_POST["submit"])) {
|
|||||||
$result = mysqli_query($conn, $sql);
|
$result = mysqli_query($conn, $sql);
|
||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
header("Location: index.php?msg=Data updated successfully");
|
header("Location: index-changes.php?msg=Data updated successfully");
|
||||||
} else {
|
} else {
|
||||||
echo "Failed: " . mysqli_error($conn);
|
echo "Failed: " . mysqli_error($conn);
|
||||||
}
|
}
|
||||||
@ -89,7 +89,7 @@ if (isset($_POST["submit"])) {
|
|||||||
|
|
||||||
<div>
|
<div>
|
||||||
<button type="submit" class="btn btn-success" name="submit">Update</button>
|
<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>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
include "db_conn.php";
|
include "db_conn-changes.php";
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
@ -20,8 +20,12 @@ include "db_conn.php";
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<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;">
|
||||||
CRUD Application
|
<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>
|
</nav>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
@ -34,7 +38,7 @@ include "db_conn.php";
|
|||||||
</div>';
|
</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">
|
<table class="table table-hover text-center">
|
||||||
<thead class="table-dark">
|
<thead class="table-dark">
|
||||||
@ -60,8 +64,8 @@ include "db_conn.php";
|
|||||||
<td><?php echo $row["email"] ?></td>
|
<td><?php echo $row["email"] ?></td>
|
||||||
<td><?php echo $row["gender"] ?></td>
|
<td><?php echo $row["gender"] ?></td>
|
||||||
<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="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.php?id=<?php echo $row["id"] ?>" class="link-dark"><i class="fa-solid fa-trash fs-5"></i></a>
|
<a href="delete-changes.php?id=<?php echo $row["id"] ?>"><i class="fa-solid fa-trash fs-5"></i></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
@ -73,7 +77,5 @@ include "db_conn.php";
|
|||||||
|
|
||||||
<!-- Bootstrap -->
|
<!-- 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>
|
<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>
|
</body>
|
||||||
|
|
||||||
</html>
|
</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