Spaces:
Sleeping
Sleeping
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Biryani Hub - Registration</title> | |
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}"> | |
</head> | |
<body> | |
<div class="container"> | |
<h1>Welcome to Biryani Hub ๐ฝ</h1> | |
<label for="name">Your Name</label> | |
<input type="text" id="name" placeholder="Your name..." readonly> | |
<label for="email">Your Email</label> | |
<input type="text" id="email" placeholder="Your email..." readonly> | |
<label for="mobile">Your Mobile Number</label> | |
<input type="text" id="mobile" placeholder="Your mobile number..." readonly> | |
<p class="info" id="infoMessage">Listening ๐ฃ๐๏ธ...</p> | |
<button onclick="startRegistration()">Start Registration</button> | |
</div> | |
<script> | |
function startRegistration() { | |
fetch('/register', { | |
method: 'POST', | |
headers: { 'Content-Type': 'application/json' }, | |
body: JSON.stringify({ | |
name: document.getElementById('name').value, | |
email: document.getElementById('email').value, | |
phone: document.getElementById('mobile').value | |
}) | |
}) | |
.then(response => response.json()) | |
.then(data => { | |
if (data.success) { | |
alert("Registration successful! Redirecting to login..."); | |
window.location.href = "/login"; | |
} else { | |
alert("Error: " + data.error); | |
} | |
}); | |
} | |
</script> | |
</body> | |
</html> | |