-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinsert_query.php
More file actions
39 lines (29 loc) · 916 Bytes
/
Copy pathinsert_query.php
File metadata and controls
39 lines (29 loc) · 916 Bytes
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 include_once('includes/connection.php');?>
<?php
$first_name = 'Hashan';
$last_name = 'Liyanage';
$email = 'hashanduplessis@gmail.com';
$password = 'reebok6996';
$is_deleted = 0;
$hashed_password = sha1($password);
//echo $hashed_password;
$query = "INSERT INTO ums_tb(first_name, last_name, email, password, is_deleted) VALUES('{$first_name}', '{$last_name}', '{$email}', '{$hashed_password}', {$is_deleted})";
$result = mysqli_query($connection, $query);
if($result){
echo"1 record is done";
}else{
echo"The record is not done";
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Insert_query</title>
</head>
<body>
</body>
</html>
<?php mysqli_close($connection);?>