-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsignup_d.php
47 lines (45 loc) · 1.06 KB
/
signup_d.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
<html>
<head>
<title>Signup</title>
</head>
<body>
<?php
if(isset($_POST['submit']))
{
$host="localhost";
$dbuser="root";
$pass="";
$dbname="project";
$connect=mysqli_connect($host,$dbuser,$pass,$dbname);
if(mysqli_connect_error())
{
die("Fault in our connection" .mysqli_connect_error());
}
$name=$_POST['name'];
$email=$_POST['email'];
$username=$_POST['username'];
$pass=$_POST['pass'];
$c_pass=$_POST['c_pass'];
$c_no=$_POST['c_no'];
if(empty($name) || empty($email) || empty($username) || empty($pass) || empty($c_pass) || empty($c_no))
{
echo "Please fill all the fields xD";
}
else
{
$sql="INSERT INTO signup(Name,Email,UserName,Password,CPassword,ContactNumber)".
"VALUES('$name','$email','$username','$pass', '$c_pass', '$c_no')";
$result=mysqli_query($connect,$sql);
if(!$result)
{
die("Error 1" . mysqli_error($connect));
}
else
{
echo "Signup Successful..!! (y)";
}
}
}
?>
</body>
<html>