-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvalidation.php
More file actions
46 lines (32 loc) · 740 Bytes
/
validation.php
File metadata and controls
46 lines (32 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
37
38
39
40
41
42
43
44
45
46
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<?php
session_start();
$con = mysqli_connect('sql303.epizy.com','epiz_28396763','x5N5ldvRxWvo');
mysqli_select_db($con,'epiz_28396763_WanglePC');
$name = $_POST['name'];
$username = $_POST['username'];
$email = $_POST['email'];
$pass = $_POST['password'];
$s = " select * from User_Details where username = '$username' && password = '$pass'";
$result = mysqli_query($con, $s);
$num = mysqli_num_rows($result);
if($num == 1)
{
$_SESSION['username'] = $username;
header('location:home.php');
}else
{
$message = "Please Register Yourself First";
echo "<script>
alert('$message');
window.location.href='index.html';
</script>";
}
?>
</body>
</html>