forked from prashasy/Login_System
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
149 lines (111 loc) · 2.59 KB
/
index.php
File metadata and controls
149 lines (111 loc) · 2.59 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
<?php
session_start();
if( isset($_SESSION['login']) )
{
$a=$_SESSION['login_user'];
header("location: dashboard.php");
}
?>
<html>
<head>
<?php
if(!(empty($_GET['msg'])) and $_SESSION['index_page_redirect_counter'])
{
?>
<script type="text/javascript">
alert("You have signed up Successfully");
</script>
<?php
$_SESSION['index_page_redirect_counter']=false;
}
?>
<script type="text/javascript">
function validate()
{
var n=document.forms['signup_form']['name'].value;
for(i=0;i<n.length;i++)
{
var a=n.charCodeAt(i);
if(a>=48 && a<=57)
{ document.getElementById("2").reset();
alert("There is a number in the name?? :D");
return false;
}
}
}
</script>
<title>Home Page!! </title>
<style type="text/css">
body{
font-family:courier;
background-color:green;
}
.LoginContent{
display:none;
background-color: orange;
}
.LoginHover{
position:absolute;
top:255px;
left:200px;
padding-left: 2px;
padding-right: 2px;
padding-top: 2px;
padding-bottom: 2px;
width:300px;
text-align:center;
font-size: 30;
background-color: orange;
}
.LoginHover:hover .LoginContent{
display:block;
}
.SignupContent{
display:none;
background-color: orange;
}
.SignupHover{
position:absolute;
top:255px;
left:700px;
padding-left: 2px;
padding-right: 2px;
padding-top: 2px;
padding-bottom: 2px;
width:300px;
text-align:center;
font-size: 30;
background-color: orange;
}
.SignupHover:hover .SignupContent{
display:block;
}
</style>
</head>
<body>
<h1 style="text-align:center"> Welcome to mah Website !! </h1>
<div class="LoginHover">
<p id="logintext"> Log In </p>
<div class=LoginContent>
<form name="login_form" action='login.php' method="post">
<input type="username" required name="usrname" placeholder="Enter Username">
<input type="password" required name="usrpass" placeholder="Enter Password">
<input type="submit" value="Log In">
</form>
</div>
</div>
<div class="SignupHover">
<p> SignUp </p>
<div class="SignupContent">
<form id="2" name="signup_form" onsubmit="return validate()" action="signup.php" method="post">
<input type="text" name="name" required placeholder="Full name please :)">
<input type="number" name="phno" required placeholder="Phone Number ;)">
<input type="text" name="uname" required placeholder="Username">
<input type="password" name="pass"required placeholder="Password">
<input type="submit" value="SignUp!!">
<input type="reset">
</form>
</div>
</div>
</body>
</html>