-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocess.php
More file actions
36 lines (26 loc) · 740 Bytes
/
Copy pathprocess.php
File metadata and controls
36 lines (26 loc) · 740 Bytes
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
<?php
require("connection.php");
if(!empty($_POST['submit']))
{
$username=$_POST['email'];
$password=$_POST['password'];
$query="select * from users where email='$username' and password= '$password' ";
$result=mysqli_query($conn,$query);
$user=mysqli_fetch_assoc($result);
$count=mysqli_num_rows($result);
if ($count >0)
{
header("location:home.php");
session_start();
$_SESSION['Email']=$user['emial'];
$_SESSION['Password']=$user['password'];
}
else
{
echo "<script type='text/jscript'>alert('Wrong Email or password.')</script>";
}
}
else{
echo "<script type='text/jscript'>alert('Wrong Email or password.')</script>";
}
?>