-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjoin.js
59 lines (52 loc) · 1.64 KB
/
join.js
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
let signupName;
let signupEmail;
let signupPassword;
let signupRepeatPassword;
function signup() {
signupName = document.getElementById("name").value;
signupEmail = document.getElementById("email").value;
signupPassword = document.getElementById("password").value;
signupRepeatPassword = document.getElementById("repeatPassword").value;
if (
signupName === "" ||
signupEmail === "" ||
signupPassword === "" ||
signupRepeatPassword === ""
) {
alert("Please fill in all fields");
} else if (signupPassword !== signupRepeatPassword) {
alert("Passwords do not match");
} else {
alert("Sign up successful");
window.location.href = "login.html";
}
}
function login() {
var logEmail = document.getElementById("loginEmail").value;
var logPassword = document.getElementById("loginPassword").value;
// console.log(logEmail, logPassword);
if (logEmail === "" || logPassword === "") {
alert("Please fill in all fields");
}
if (logEmail !== signupEmail || logPassword !== signupPassword) {
alert("Login successful");
window.location.href = "plans.html";
}
// if (logEmail === "" || logPassword === "") {
// alert("Please fill in all fields");
// } else if (signupEmail !== logEmail || signupPassword !== logPassword) {
// alert("Invalid email or password");
// } else {
// alert("Login successful");
// window.location.href = "plans.html";
// }
}
function package1() {
alert("You successfully purchased Basic package");
}
function package2() {
alert("You successfully purchased Premium package");
}
function package3() {
alert("You successfully purchased Family package");
}