forked from prasangafdo/RapidDeliveryweb1.5
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinsertcustomer.php
63 lines (45 loc) · 1.35 KB
/
insertcustomer.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
<?php
include('loginCustomer.php'); // Includes Login Script
if(isset($_SESSION['login_user'])){
header("location: home.php");
}
?>
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>Rapid Delivery Login</title>
<link rel="stylesheet" href="css/style.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body>
<div class="body"></div>
<div class="grad"></div>
<br>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<?php
require 'connect.php';
$uname = $_POST['uname'];
$pss = $_POST['pss'];
$email = $_POST['email'];
$address = $_POST['address'];
$telephone = $_POST['telephone'];
$rName = $_POST['receiverName'];
$rPss = $_POST['receiverPassword'];
$sql = "INSERT INTO customer (username, password, email, address, tel, Receiver_Name, Receiver_password)
VALUES ('$uname', '$pss', '$email', '$address', '$telephone', '$rName', '$rPss')";
if (mysqli_query($con, $sql)) {
echo "New record created successfully";
} else {
echo "Error: " . $sql . "<br>" . mysqli_error($con);
}
$sql1 = "INSERT INTO receiver (username, password)
VALUES ('$rName', '$rPss')";
if (mysqli_query($con, $sql1)) {
echo "New record created successfully";
} else {
echo "Error: " . $sql1 . "<br>" . mysqli_error($con);
}
?>
</body>
</html>