<!DOCTYPE html>
<html>
<head>
	<title>Submission 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;
			font-size:40px;
		}

		.error-message {
			color: red;
			font-weight: bold;
		}
	</style>
</head>
<body>
	<div class="message-container">
		<?php
			// Connect to the database
			require_once('db.php');

			// Retrieve the submission status from the database based on the user's email address
			if(isset($_POST['email'])) {
			    $email = $_POST['email'];
			    $sql = "SELECT status FROM submissions WHERE email='$email'";
			    $result = $conn->query($sql);
			    if ($result->num_rows > 0) {
			        $row = $result->fetch_assoc();
			        echo "<p class='success-message'>Your submission status is: " . $row['status'] . "</p>";
			    } else {
			        echo "<p class='error-message'>No submission found with this email address.</p>";
			    }
			}

			$conn->close();
		?>
	</div>
</body>
</html>
