-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsignup.php
More file actions
168 lines (147 loc) · 6.19 KB
/
signup.php
File metadata and controls
168 lines (147 loc) · 6.19 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
<?php session_start(); ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Register - ExpenseVoyage</title>
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@500;700&family=Lora&display=swap" rel="stylesheet">
<!-- Bootstrap -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom Theme -->
<style>
:root {
--deep-ocean: #023047;
--golden-sand: #F4A261;
--sunset-coral: #E76F51;
--sky-white: #FAFAFA;
--sea-mist: #E5E5E5;
}
body {
background: linear-gradient(135deg, var(--deep-ocean), var(--sunset-coral));
font-family: 'Poppins', sans-serif;
color: var(--sky-white);
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
.register-form {
background: rgba(2, 48, 71, 0.92);
padding: 2rem;
border-radius: 15px;
box-shadow: 0 0 20px rgba(244, 162, 97, 0.4);
width: 100%;
max-width: 500px;
}
.bon-voyage-img {
max-width: 180px;
}
.form-control {
border-radius: 10px;
border: 1px solid var(--sea-mist);
background-color: rgba(250, 250, 250, 0.08);
color: var(--sky-white);
}
.form-control::placeholder {
color: var(--sea-mist);
}
.form-control:focus {
border-color: var(--golden-sand);
box-shadow: 0 0 8px var(--golden-sand);
background-color: rgba(250, 250, 250, 0.15);
}
.register-button {
background: var(--golden-sand);
color: var(--deep-ocean);
font-weight: 600;
border-radius: 8px;
padding: 0.6rem;
border: none;
transition: all 0.3s ease;
}
.register-button:hover {
background: var(--sunset-coral);
color: var(--sky-white);
transform: scale(1.05);
}
.login-link {
display: block;
text-align: center;
margin-top: 15px;
color: var(--golden-sand);
text-decoration: none;
font-weight: 500;
transition: color 0.3s ease;
}
.login-link:hover {
color: var(--sunset-coral);
text-decoration: underline;
}
</style>
</head>
<body>
<div class="register-form my-4">
<!-- Bon Voyage logo -->
<div class="text-center mb-3">
<img src="./Assets/Bon-voyage.png" alt="Bon Voyage" class="bon-voyage-img">
</div>
<form id="registerForm" action="register-query.php" method="post" enctype="multipart/form-data">
<div class="mb-3">
<input type="text" id="firstName" class="form-control" placeholder="First Name" name="firstN" required
value="<?php echo isset($_SESSION['signup_name']) ? htmlspecialchars($_SESSION['signup_name']) : ''; ?>">
</div>
<div class="mb-3">
<input type="text" id="lastName" class="form-control" placeholder="Last Name" name="lastN" required
value="<?php echo isset($_SESSION['signup_name_last']) ? htmlspecialchars($_SESSION['signup_name_last']) : ''; ?>">
</div>
<div class="mb-3">
<input type="email" id="email" class="form-control" placeholder="Email" name="email" required
value="<?php echo isset($_SESSION['signup_email']) ? htmlspecialchars($_SESSION['signup_email']) : ''; ?>">
</div>
<div class="mb-3">
<input type="password" id="password" class="form-control" placeholder="Password" name="password"
required>
</div>
<div class="mb-3">
<input type="password" id="confirmPassword" class="form-control" placeholder="Confirm Password"
name="confirm-password" required>
</div>
<div class="mb-3">
<select id="currency" class="form-control" name="currency" required>
<option value="" selected hidden>Preferred Currency</option>
<?php
if (isset($_SESSION['signup_currency']) && $_SESSION['signup_currency'] === 'USD') {
echo '<option value="USD" selected>USD</option><option value="EUR">EUR</option><option value="PKR">PKR</option>';
} elseif (isset($_SESSION['signup_currency']) && $_SESSION['signup_currency'] === 'EUR') {
echo '<option value="USD">USD</option><option value="EUR" selected>EUR</option><option value="PKR">PKR</option>';
} elseif (isset($_SESSION['signup_currency']) && $_SESSION['signup_currency'] === 'PKR') {
echo '<option value="USD">USD</option><option value="EUR">EUR</option><option value="PKR" selected>PKR</option>';
} else {
echo '<option value="USD">USD</option><option value="EUR">EUR</option><option value="PKR">PKR</option>';
}
?>
</select>
</div>
<button type="submit" class="register-button w-100" name="signup-btn">Register</button>
<div style="color: var(--sunset-coral); margin-top: 10px;">
<?php
if (isset($_SESSION['error'])) {
echo $_SESSION['error'];
unset($_SESSION['error']);
}
unset(
$_SESSION['signup_name'],
$_SESSION['signup_name_last'],
$_SESSION['signup_email'],
$_SESSION['signup_currency']
);
?>
</div>
</form>
<!-- Login link -->
<a href="login.php" class="login-link">Already have an account? Login here</a>
</div>
</body>
</html>