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 - Login</title> | |
| <link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}"> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <h1>Login to Biryani Hub ๐ฝ</h1> | |
| <label for="loginEmail">Your Email</label> | |
| <input type="text" id="loginEmail" placeholder="Your email..." readonly> | |
| <label for="loginMobile">Your Mobile Number</label> | |
| <input type="text" id="loginMobile" placeholder="Your mobile number..." readonly> | |
| <p class="info" id="infoMessageLogin">Listening ๐ฃ๐๏ธ...</p> | |
| <button onclick="startLogin()">Login</button> | |
| </div> | |
| <script> | |
| function startLogin() { | |
| fetch('/validate_login', { | |
| method: 'POST', | |
| headers: { 'Content-Type': 'application/json' }, | |
| body: JSON.stringify({ | |
| email: document.getElementById('loginEmail').value, | |
| mobile: document.getElementById('loginMobile').value | |
| }) | |
| }) | |
| .then(response => response.json()) | |
| .then(data => { | |
| if (data.success) { | |
| alert("Login successful! Redirecting..."); | |
| window.location.href = "/menu"; // Redirect to the menu or home page | |
| } else { | |
| alert("Error: " + data.error); | |
| } | |
| }); | |
| } | |
| </script> | |
| </body> | |
| </html> | |