Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update temp email prob . .html #102

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 40 additions & 6 deletions error/user_not_found.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,42 @@
<html>
<head><link rel="stylesheet" href="style/style.css"></head>
<body>
<div class="error-container">


<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Email Validation</title>
</head>

<body>

<div class="error-container">
<h4>User not found, try searching something different</h4>
</div>
</body>
</html>

<?php
// Check if the form is submitted
if ($_SERVER["REQUEST_METHOD"] == "POST") {
// Get the entered email address
$email = $_POST["email"];

// Check if the email contains yopmail.com
if (strpos($email, 'yopmail.com') !== false) {
echo '<p style="color: red;">Error: Yopmail.com email addresses are not allowed.</p>';
} else {
// If not yopmail.com, display a success message
echo '<p style="color: green;">Email validation successful! Entered email: ' . $email . '</p>';
}
}
?>

<!-- Simple form for testing -->
<form method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>">
<label for="email">Enter Email:</label>
<input type="text" id="email" name="email" required>
<button type="submit">Submit</button>
</form>
</body>

</html>