-
Notifications
You must be signed in to change notification settings - Fork 0
/
signup.php
143 lines (101 loc) · 4.21 KB
/
signup.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<!---------------------------->
<!--html start-->
<!---------------------------->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="samra_anwar.css">
</head>
<body>
<!--internal css-->
<style>
#container {
background-color: white;
height: 30px;
width: 100%;
}
</style>
<div class="Donor_bg">
<div id="container">
<div id="header">
<h1>Donate Medicine or Help Messes </h1>
</div>
<!-- <div id="nav">-->
<!-- <ul>-->
<!-- <li> <a href="samra_anwar.php"><b>Home</b></a></li>-->
<!-- <li> <a href="donor.php"><b>Donor</b> </a></li>-->
<!-- <li><a href="receive.php"><b>Receiver</b> </a></li>-->
<!-- <li><a href="about.php"> <b>About</b> </a></li>-->
<!-- <li> <a href="signup.php"><b>login/signup</b> </a></li>-->
<!-- <li><a href="logout.php">logout</a></li>-->
<!-- -->
<!-- </ul>-->
<!-- </div>-->
</div>
<div class="form">
<ul class="tab-group">
<li class="tab"><a href="login_about.php" style="margin-left: 90px;">About Us</a></li>
<li class="tab active"><a href="signup.php">Sign Up</a></li>
<li class="tab "><a href="login.php">Log In</a></li>
</ul>
<div class="tab-content">
<div id="signup">
<h1>Sign Up for Free</h1>
<form action="signup.php" method="post">
<div class="top-row">
<div class="field-wrap">
<input type="text" required autocomplete="off" name="firstname" placeholder="First Name *" />
</div>
<div class="field-wrap">
<input type="text" required autocomplete="off" name="lastname" placeholder="Last Name *" />
</div>
</div>
<div class="field-wrap">
<input type="email" required autocomplete="off" name="email" placeholder="Email Address *" />
</div>
<div class="field-wrap">
<input type="password" required autocomplete="off" name="password" placeholder=" Set A Password*"/>
</div>
<button type="submit" class="button button-block" name="submit">Get Started</button>
</form>
</div>
</div><!-- tab-content -->
</div> <!-- /form -->
</div>
</body>
<!---------------------------->
<!--php start-->
<!---------------------------->
<?php
include('dbcon.php');
if(isset($_POST['submit'])){
$f_name=$_POST['firstname'];
$l_name=$_POST['lastname'];
$email=$_POST['email'];
$password=$_POST['password'];
$qry1="INSERT INTO `signup_form`(`first_name`, `last_name`,`email`, `password`) VALUES ('$f_name','$l_name','$email','$password')";
// execute query and show results or error
if ($connection->query($qry1) === TRUE) {
echo "Thanks for creating Account";
?>
<script>
// alert("Data added successfully !");
window.open('login.php','_self');
</script>
<?php
}else{
echo "Error in inserting: ".$connection->error;
}
}
?>
<!---------------------------->
<!--php end-->
<!---------------------------->
</html>
<!---------------------------->
<!--html end-->
<!---------------------------->