-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
32 lines (31 loc) · 1.44 KB
/
index.php
File metadata and controls
32 lines (31 loc) · 1.44 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
<html>
<head>
<title>Personal Book Library</title>
<meta charset="utf-8">
<link rel="stylesheet" href="css/style.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script type="text/JavaScript" src="./js/app.js"></script>
</head>
<body>
<h1>Welcome to your personal book library.</h1>
<form method="POST" action="api/books.php">
<fieldset style=" width: 100%">
<legend>Add a new book to the library:</legend>
<label>Title:</label>
<input type="text" name="title" id="title" placeholder="The Catcher in the Rye" required><br>
<label>Author:</label>
<input type="text" name="author" id="author" placeholder="J.D. Salinger" required><br>
<label>Description:</label>
<textarea rows="4" cols="40" name="description" id="description" placeholder="Depiction of adolescent alienation and loss of innocence in the protagonist Holden Caulfield." required></textarea>
<input type="submit" value="Submit" id="submitBtn">
</fieldset>
</form>
<div id="bookAdded">
<!-- info about book addition to db -->
</div>
<p>Press the book title to show its description.</p>
<div id="bookList">
<!-- All books got from db appear here -->
</div>
</body>
</html>