-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
69 lines (58 loc) · 1.32 KB
/
index.php
File metadata and controls
69 lines (58 loc) · 1.32 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
<?php
session_start();
$UserId=$_REQUEST['UserId'];
$pwd=$_REQUEST['pwd'];
if($_REQUEST['SignIn'])
{
if($UserId=="" or $pwd=="")
{
$errorMsg="Fill all req.. fields!";
}
else
{
if(file_exists("userProfile/$UserId") and file_exists("userProfile/$UserId/$pwd"))
{
//check User Id & pwd:if true
$_SESSION['UserId'] = $UserId;
header("location: userAccount.php?event=inbox");
}
else
{
//else: errorMsg
$errorMsg="Invalid Id or Pwd!";
}
}
}
?>
<html>
<head>
<meta charset="utf-8">
<title>Login Page</title>
<link href="index.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="wrapper"><!--wrapper startss-->
<img src="logo.png" alt="" id="logo"/>
<p>Sign in with your Google Account</p>
<form id="loginform" action="" method="post"><!--login form starts-->
<table id="logintable">
<tr>
<td id="errorMsg"><?php echo $errorMsg; ?></td>
</tr>
<tr>
<td><input type="text" name="UserId" value placeholder="User ID" id="UId" ></td>
</tr>
<tr>
<td><input type="password" name="pwd" value placeholder="Password" id="pwd"></td>
</tr>
<tr>
<td>
<input type="submit" value="Sign In" name="SignIn" id="login">
</td>
</tr>
</table>
<a href="registration_page.php" id="RegLink">Create an account</a>
</form><!--login form ends-->
</div><!--wrapper ends-->
</body>
</html>