-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
executable file
·51 lines (44 loc) · 1.59 KB
/
index.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
<?php
session_start();
require_once 'dbconfig/config.php';
?>
<!DOCTYPE html>
<html>
<head>
<title>Login page</title>
<link rel="stylesheet" href="home.css">
<div id="heading">
<h1><center><u>Income Tax Calculation</u></center></h1>
<h3><center>Veer Surendra Sai University Of Technology,Burla</center></h3>
</div>
</head>
<body style="background-color:#34495e">
<div id="mainform">
<center> <img src="vssut.jpg" class="avatar" /></center>
<form class="myform" action="index.php" method="post">
<br><b>Username:</b><br><input type="text" class="ip" name="uname" required/><br>
<br><b>Password:</b><br><input type="password" class="ip" name="pass" required/><br><br>
<center><input type="submit" class="sub" name="login" value="Login"></center><br>
<center><a href="register.php"><input type="button" class="bck" name="signup" value="Register"></a></center>
</form>
</div>
<?php
if(isset($_POST['login']))
{
$uname=$_POST['uname'];
$pass=$_POST['pass'];
$query="select * from itax WHERE USERNAME='$uname' AND PASSWORD='$pass'";
$query_run = mysqli_query($con,$query);
if(mysqli_num_rows($query_run)>0)
{
$_SESSION['uname']= $uname;
header('location:hpage.php');
}
else
{
echo "<script type='text/javascript'>alert('Invalid credentials! Try again');</script>";
}
}
?>
</body>
</html>