-
Notifications
You must be signed in to change notification settings - Fork 0
/
signup.php
39 lines (35 loc) · 1015 Bytes
/
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
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "art";
// create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
// check connection
if (!$conn) {
die("connection failed" . mysqli_connect_error());
}
mysqli_select_db($conn, 'art');
$email = $password = $cpassword = '';
//$errMail = $errPassword=$errcPassword="";
if (isset($_POST["submit"])) {
$email = $_POST["exampleInputEmail1"];
$password = $_POST["exampleInputPassword1"];
$cpassword = $_POST["cexampleInputPassword1"];
}
if ($password == $cpassword) {
$sql = "INSERT INTO customerlogon( UserName, Pass )
VALUES ('$email','$password')";
//
if (mysqli_query($conn, $sql)) {
// echo "new record created successfully";
// include('contact');
header("Location: Userindex.php");
} else {
echo "Error :" . $sql . "<br>" . mysqli_error($conn);
}
mysqli_close($conn);
} else {
echo "Password does not match";
}
?>