<!DOCTYPE html>
<html>
<head>
	<title>Decline Status</title>
	<style>
		body {
			background-color: #1f1f1f;
			color: white;
			display: flex;
			align-items: center;
			justify-content: center;
			height: 100vh;
			margin: 0;
		}

		.message-container {
			background-color: white;
			padding: 20px;
			border-radius: 10px;
			text-align: center;
		}

		.success-message {
			color: green;
			font-weight: bold;
		}

		.error-message {
			color: red;
			font-weight: bold;
		}
	</style>
	<script>
		setTimeout(function() {
			window.location.href = "/kycadmin.php";
		}, 500);
	</script>
	<body>
	<div class="message-container">
<?php
require_once('db.php');
// rest of your code


// Retrieve the submission ID from the form data
$id = $_POST['id'];

// Update the submission status in the database to "Declined"
$sql = "UPDATE submissions SET status='Declined' WHERE id=$id";
if ($conn->query($sql) === TRUE) {
    echo "<p class='success-message'>Submission record updated successfully. </p>";
} else {
    echo "<p class='success-message'>Error updating submission record: </p>" . $conn->error;
}

$conn->close();
?>
