-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunc.php
More file actions
67 lines (63 loc) · 1.65 KB
/
func.php
File metadata and controls
67 lines (63 loc) · 1.65 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
<?php
$con=mysqli_connect("localhost:3307","root","","login");
if(isset($_POST['submit']))
{
$username=$_POST['email'];
$password=$_POST['password'];
$query="select * from users where username='$username' and password='$password'";
$result=mysqli_query($con,$query);
if(mysqli_num_rows($result)>=1)
{
header("Location:homepage.php");
}
else
{
echo"<script>alert('Wrong Details');</script>";
echo"<script>window.open('login.html','_self')</script>";
}
}
if(isset($_POST['signup']))
{
$username=$_POST['email'];
$password=$_POST['password'];
$name=$_POST['name'];
$dob=$_POST['dob'];
$query="insert into users values('$username','$password')";
$result=mysqli_query($con,$query);
if($result)
{
echo "<script>alert('Registration Sucessful');</script>";
echo"<script>window.open('login.html','_self')</script>";
}
}
if(isset($_POST['fedex']))
{
$name=$_POST['name'];
$bank=$_POST['bank'];
$email=$_POST['email'];
$date=$_POST['date'];
$comments=$_POST['comments'];
$query="insert into kuss values('$name','$bank','$email','$date','$comments')";
$result=mysqli_query($con,$query);
if($result)
{
echo "<script>alert('your feedback is appreciated');</script>";
echo"<script>window.open('homepage.html','_self')</script>";
}
}
if(isset($_POST['join']))
{
$name=$_POST['fname'];
$bank=$_POST['city'];
$email=$_POST['id'];
$date=$_POST['birthday'];
$comments=$_POST['comments'];
$query="insert into rohite values('$name','$bank','$email','$date','$comments')";
$result=mysqli_query($con,$query);
if($result)
{
echo "<script>alert('your feedback is appreciated');</script>";
}
}
echo"<script>window.open('submit.html')</script>";
?>