-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdataInsert.php
38 lines (29 loc) · 2.33 KB
/
dataInsert.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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Customer Data Insert</title>
</head>
<body>
<?php
$con=mysqli_connect("localhost","root","") or die(mysqli_error($con));
mysqli_query($con,"create database if not exists TSFBankDb") or die(mysqli_error($con));
mysqli_query($con,"use TSFBankDb") or die(mysqli_error($con));
//customerTb creation
mysqli_query($con,"create table if not exists CustomerTb (id int(11) primary key auto_increment NOT NULL,Email varchar(100) NOT NULL,Name varchar(100) NOT NULL,Credits varchar(100) NOT NULL)") or die(mysqli_error($con));
/*mysqli_query($con,"INSERT INTO CustomerTb (Email,Name,Credits) VALUES ('[email protected]','Aarav','30,000')") or die(mysqli_error($con));
mysqli_query($con,"INSERT INTO CustomerTb (Email,Name,Credits) VALUES ('[email protected]','Ayushi','20,000')") or die(mysqli_error($con));
mysqli_query($con,"INSERT INTO CustomerTb (Email,Name,Credits) VALUES ('[email protected]','Arun','10,000')") or die(mysqli_error($con));
mysqli_query($con,"INSERT INTO CustomerTb (Email,Name,Credits) VALUES ('[email protected]','Riya','40,000')") or die(mysqli_error($con));
mysqli_query($con,"INSERT INTO CustomerTb (Email,Name,Credits) VALUES ('[email protected]','Komal','25,000')") or die(mysqli_error($con));
mysqli_query($con,"INSERT INTO CustomerTb (Email,Name,Credits) VALUES ('[email protected]','Shrey','40,550')") or die(mysqli_error($con));
mysqli_query($con,"INSERT INTO CustomerTb (Email,Name,Credits) VALUES ('[email protected]','Virat','35,500')") or die(mysqli_error($con));
mysqli_query($con,"INSERT INTO CustomerTb (Email,Name,Credits) VALUES ('[email protected]','Yash','30,000')") or die(mysqli_error($con));
mysqli_query($con,"INSERT INTO CustomerTb (Email,Name,Credits) VALUES ('[email protected]','Sara','30,000')") or die(mysqli_error($con));
mysqli_query($con,"INSERT INTO CustomerTb (Email,Name,Credits) VALUES ('[email protected]','Ishani','30,000')") or die(mysqli_error($con));*/
//recordsTb creation
mysqli_query($con,"create table if not exists RecordsTb (Sender varchar(100) ,Reciever varchar(100),Credits int(100))") or die(mysqli_error($con));
mysqli_close($con);
?>
</body>
</html>