-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdatabase_connection.html
More file actions
51 lines (38 loc) · 1.86 KB
/
database_connection.html
File metadata and controls
51 lines (38 loc) · 1.86 KB
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
<!DOCTYPE html>
<html>
<head>
<title>Web SQL Database with HTML and Javascript</title>
<meta name="viewport" content="user-scalable=no,width=device-width" />
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<script defer src="https://pyscript.net/alpha/pyscript.js"></script>
<py-script src="/python/database_handler.py"></py-script>
</head>
<body style="margin:30px">
<div class="container">
<h1 class="text-center">School of Thought</h1>
<h3 class="text-center pb-5">PyScript</h3>
<div class="row">
<form>
<fieldset>
<legend>Item Name</legend>
<input type="text" class="form-control" name="" id="item">
<legend>Quantity</legend>
<input type="number" class="form-control" id="quantity" name="">
<br>
<button type="button" id="insert" class="btn btn-success" pys-onClick="insert">Insert</button>
<button type="button" id="create" class="btn btn-success" pys-onClick="create">Create Table</button>
<button type="button" id="remove" class="btn btn-danger">Delete Table</button>
<button type="button" id="list" class="btn btn-success" pys-onClick="fetch">Fetch Record</button>
<p><small><b>Note:</b> Table must be created first before inserting or performing any
transaction</small></p>
</fieldset>
</form>
<hr>
<h4>Record</h4>
<table class="table table-bordered table-hover" id="itemlist">
</table>
</div>
</div>
</body>
</html>