34132-vm/register.php
Flatlogic Bot 05d192f46f MagiCV
2025-09-17 11:37:51 +00:00

44 lines
1.4 KiB
PHP

<?php
require_once __DIR__ . '/includes/header.php';
?>
<div class="auth-container">
<h2>Create Your Account</h2>
<?php if (isset($_GET['error'])): ?>
<p class="error">
<?php
switch ($_GET['error']) {
case 'invalid_input':
echo 'Invalid input. Please check your email and password.';
break;
case 'user_exists':
echo 'User with this email already exists.';
break;
case 'db_error':
echo 'An error occurred. Please try again later.';
break;
default:
echo 'An unknown error occurred.';
break;
}
?>
</p>
<?php endif; ?>
<form action="/auth/register_handler.php" method="POST">
<div class="form-group">
<label for="email">Email</label>
<input type="email" id="email" name="email" required>
</div>
<div class="form-group">
<label for="password">Password</label>
<input type="password" id="password" name="password" required>
</div>
<button type="submit" class="button">Register</button>
</form>
<p>Already have an account? <a href="/login.php">Login here</a>.</p>
</div>
<?php
require_once __DIR__ . '/includes/footer.php';
?>