-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsignup.php
More file actions
47 lines (38 loc) · 1.35 KB
/
signup.php
File metadata and controls
47 lines (38 loc) · 1.35 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
<link rel="stylesheet" href="style.css">
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sign Up Form</title>
</head>
<body>
<div class="login">
<form name='form-login' action="data.php">
<h1>SIGN IN</h1>
<label for="userName">User Name</label>
<input type="text" id="userName" placeholder="Username" required><br>
<label for="userPw">Password</label>
<input type="number" id= "userMob" placeholder="Mobile No." required><br>
<input id= "login_btn" type="submit" value="Login" onclick="check()">
</form>
</div>
</body>
</html>
<script>
//checking
function check(){
var storedUsername = localStorage.getItem('username');
var storedMob = localStorage.getItem('mob');
var userName = document.getElementById('userName');
var userMob = document.getElementById('userMob');
var userRemember = document.getElementById("rememberMe");
if(userName.value == storedUsername && userMob.value == storedMob){
alert('You are logged in.');
// location.href = "/login/data.php";
}else{
alert('Error on login');
}
}
</script>