crud complete
This commit is contained in:
1 parent
a7f793b22a
commit
51ca61242d
4 files changed
+329
-1
No files matched your search
@@ -31,4 +31,60 @@ if(isset($_GET["id"]) && !empty(trim($_GET["id"]))){
|
||||
// URL doesn't contain valid id parameter. Redirect to error page
|
||||
header("location: error.php");
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
} else{
|
||||
echo "Oops! Something went wrong. Please try again later.";
|
||||
}
|
||||
}
|
||||
|
||||
// Close statement
|
||||
mysqli_stmt_close($stmt);
|
||||
|
||||
// Close connection
|
||||
mysqli_close($link);
|
||||
} else{
|
||||
// URL doesn't contain id parameter. Redirect to error page
|
||||
header("location: error.php");
|
||||
exit();
|
||||
}
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>View Record</title>
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
|
||||
<style>
|
||||
.wrapper{
|
||||
width: 600px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h1 class="mt-5 mb-3">View Record</h1>
|
||||
<div class="form-group">
|
||||
<label>Name</label>
|
||||
<p><b><?php echo $row["name"]; ?></b></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Address</label>
|
||||
<p><b><?php echo $row["address"]; ?></b></p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Salary</label>
|
||||
<p><b><?php echo $row["salary"]; ?></b></p>
|
||||
</div>
|
||||
<p><a href="index.php" class="btn btn-primary">Back</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user