-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlogverip.php
57 lines (38 loc) · 926 Bytes
/
logverip.php
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
<?php
require_once "connection.php";
// Initialize the session
session_start();
if (isset($_POST['username']))
{
$uname = $_POST['username'];
}
if (isset($_POST['password']))
{
$psw = $_POST['password'];
}
$sql = "SELECT username,password FROM login where username='$uname' and password='$psw'";
$result = $conn->query($sql);
if ($result->num_rows > 0)
{
echo "successful login";
session_start();
// Store data in session variables
$_SESSION["loggedin"] = true;
$_SESSION["username"] = $uname;
header("location: welcome.php");
}
else
{
echo '<script language="javascript">';
echo 'alert("incorrect username or password !")';
echo '</script>';
}
$conn->close();
?>
<!--<html>
<body>
<div>
<p> welcome </p>
</div>
</body>
</html> -->