-
Notifications
You must be signed in to change notification settings - Fork 0
/
addvaluescustomer.php
60 lines (49 loc) · 1.3 KB
/
addvaluescustomer.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
<?php
include_once 'connection.php';
?>
<?php
/*$firstName = 'Saduni';
$lastName= 'Vithanage';
$username = '[email protected]';
$password = 'Saduni1998';
$address = 'Malabe';
//secondsample person
$firstName = 'Himali';
$lastName= 'Konara';
$username = '[email protected]';
$password = 'himali98';
$address = 'Badulla';
//third sample person
$firstName = 'Lochana';
$lastName= 'Wijerathna';
$username = '[email protected]';
$password = 'lochana2000';
$address = 'Colombo';
//forth sample person
$firstName = 'Chathuni';
$lastName= 'Weeraman';
$username = '[email protected]';
$password = 'chathuniR';
$address = 'Bandarawela';
//fifth sample person
/*$firstName = 'Yasiru';
$lastName= 'Pereira';
$username = '[email protected]';
$password = 'yasiru1997';
$address = 'Diyathalawa';*/
//$Amount = '4500.00';
/*$hashed_password = sha1($password);
//echo"HASHED : {$hashed_password}";
$query = "INSERT INTO customer(firstName,lastName, username,password,address) VALUES ('{$firstName}','{$lastName}','{$username}','{$hashed_password}','{$address}')";*/
$query = "INSERT INTO cart (Amount) VALUES ('5430')";
$result = mysqli_query($connection,$query);
if($result)
{
//header("Location:index.php");
echo "1 Record added";
}
else
{
echo "database query failed.";
}
//echo "<script> alert('Error:could not able to execute')";