-
Notifications
You must be signed in to change notification settings - Fork 0
/
userinsert.php
42 lines (35 loc) · 923 Bytes
/
userinsert.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
<?php
;
if (isset($_POST['submit'])) {
include("DBconnection.php");
$CustomerName=$_POST['CustomerName'];
$Address=$_POST['Address'];
$City=$_POST['City'];
$PostalCode=$_POST['PostalCode'];
$Country=$_POST['Country'];
$email=$_POST['email'];
$password=$_POST['password'];
//$trn_date = date("Y-m-d H:i:s");
//echo $user_fname;
//echo $user_lname;
//echo $user_email;
//echo $user_address;
//echo $user_City;
//echo $user_ZipCode;
//echo $user_password;
$sql = "INSERT INTO tbl_customer ". "(CustomerName, Address, City, PostalCode,Country,email ,password)"."VALUE('$CustomerName','$Address','$City','$PostalCode','$Country','$email','$password')";
$results = mysqli_query($conn, $sql);
if(!$results) {
die('Could not enter data: '.mysqli_error($conn));
}
else
{
// echo "Entered data successsfully\n";
header("Location:account.php");
}
}
else
{
// echo 'submit the form first';
}
?>