File size: 1,745 Bytes
f2dc0dc
635ad5b
 
 
 
 
f71dfd5
 
635ad5b
72a81f7
f71dfd5
 
 
 
cc4f4bc
f71dfd5
 
cc4f4bc
f71dfd5
 
1e3da22
f71dfd5
 
66cea21
 
72a81f7
f71dfd5
66cea21
a666aaa
 
9ecba6e
 
 
 
 
f71dfd5
 
 
 
 
 
 
 
 
 
a666aaa
635ad5b
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50

<!DOCTYPE html>
<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>