Professional Documents
Culture Documents
Micro-Project Proposal
It include detailing the processes for user authentication , book availability and
transaction recording.
4. Data design :- It typically involves creating a well-structured database and utilizing the
appropriate methods to interact with it .We designed a database schema to store
information of user profiles, book details transaction history.
5. GUI Design :- It involves creating web – based interfaces using HTML, CSS.
Key consideration for GUI design
1. HTML and CSS Integration
2. Template Engines
3. PHP Framework
4. Form Handling
5. User Authentication and Authorization.
3.0. Action Plan
Planned
Sr. Planned Name of Responsible
Details of activity Finish
No. Start Date Team Member
Date
Information Gathering and Topic
1 8/01/24 12/01/24 Sanjana Suryawanshi
Finalization
Preparing Project Proposal and
2 15/01/24 15/01/24 Sanjana Suryawanshi
Approval
3 Implementing Project 16/01/24 30/01/24 Sanjana Suryawanshi
03 Editor VS Code 01
1.0. Rationale
An online book issuing application is important as it provides users with convenient access to a
wide range of books from the comfort of their devices .It also streamlines the borrowing
process, enhance online book store management, and promotes reading in the digital age. It is
more user – friendly, efficient, and adaptable to modern technology. Users can easily login,
can add book, borrow and return books .
1. Registration Page:
- Allows users to create a new account by providing necessary information like
username and password.
- Validates user inputs to ensure data integrity and security.
- Upon successful registration, users are redirected to the login page.
2. Login Page:
- Provides a login interface for existing users to access their accounts.
- Authenticates user credentials against the database to grant access.
- Upon successful login, users are redirected to the dashboard or home page.
3. Home Page:
- Serves as the main landing page after login, displaying options for various actions.
- Provides links or buttons to navigate to different sections of the website, such as
adding a book, issuing a book, returning a book, or viewing book details.
4. Add Book:
- Allows authorized users to add new books to the library database.
- Collects information about the BookId, Book Title , Genre, and availability status.
- Validates book details to ensure accuracy and completeness before submission.
5. Issue Book:
- Enables users to borrow books from the library by selecting the desired book by
inserting BookId.
- Validates user inputs to ensure the selected book is available for borrowing.
- Updates the database to reflect the book's status as "issued" and records the
borrower's information by using user ID and issue date.
6. Return Book:
- Allows users to return borrowed books to the library by selecting the book from
their list of checked-out items.
- Validates user inputs to ensure the selected book is eligible for return.
- Updates the database to change the book's status back to "available" and records
the return date.
7. Display Books:
- Shows a comprehensive list of all books available in the library, including details
such as book ID, title, author, genre, and availability status.
- Indicates whether each book is currently available for borrowing or already
issued to a user.
- Allows users to filter or search for specific books based on criteria like genre or
title.
- Each page in the online book issue system serves a specific function and
contributes to the over all user experience by facilitating different aspects of
book management and lending processes.
Connecting to Database
Before we can access data in the MySQL database, we need to be able to connect
to the server, that is, open a connection with database server to send command and
results.
By using mysqli_connect() function we can connect to the server and open
connection with database as shown below-
<?php
$servername="localhost";
$username="root";
$password="";
$db_name="db";
$conn=new mysqli($servername,$username,$password,$db_name);
if($conn->connect_error){
die("Connection Failed".$conn->connect_error);
}
echo"";
?>
Creating Table:
The CREATE TABLE statement is used to create a table in MySQL. We will create a
table named "tbluser", with five columns: "id", "firstname", "lastname", "email"
and "reg_date":
For Example,
mysql> CREATE TABLE tbluser (
-> firstName VARCHAR(255) NOT NULL,
-> lastName VARCHAR(255),
-> email VARCHAR(255),
-> id VARCHAR(255) PRIMARY KEY NOT NULL,
-> branch VARCHAR(255),
-> year VARCHAR(255)
-> );
--
INSERT INTO `book` (`id`, `bookid`, `title`, `genre`) VALUES
(1, 'BOOK1201', 'Java', 'nonfiction'),
(2, 'BOOK1202', 'PHP', 'nonfiction'),
(3, 'BOOK1203', 'python', 'nonfiction'),
(4, 'BOOK1230', 'Programming in Python', 'nonfiction');
--
--
ALTER TABLE `book`
MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
COMMIT;
It include detailing the processes for user authentication , book availability and
transaction recording.
4. Data design :- It typically involves creating a well-structured database and utilizing the
appropriate methods to interact with it .We designed a database schema to store
information of user profiles, book details transaction history.
5. GUI Design :- It involves creating web – based interfaces using HTML, CSS.
Key consideration for GUI design
1. HTML and CSS Integration
2. Template Engines
3. PHP Framework
4. Form Handling
5. User Authentication and Authorization.
Planned
Sr. Planned Name of Responsible
Details of activity Finish
No. Start Date Team Member
Date
Information Gathering and Topic
1 08/01/24 12/01/24 Sanjana Suryawanshi
Finalization
Preparing Project Proposal and
2 15/01/24 15/01/24 Sanjana Suryawanshi
Approval
3 Implementing Project 16/01/24 30/01/24 Sanjana Suryawanshi
3 Editor VS Code 01
10.0 References
1. http://www.geeksforgeeks.org
2. http://www.w3schools.com
Annexure - IV
Micro-Project Evaluation Sheet
Name of Student: Sanjana Sharad Suryawanshi Enrollment No:2107760068
Name of Programme: Computer Engineering (CO) Semester: Sixth
Course Title: Web based Application Development with PHP Code: 22619
Title of the Micro-Project:
Course Outcomes Achieved:-
CO
Course Outcomes Achieved/Not Achieved
No.
a) Develop program using control statement. Achieved
b) Perform operations based on arrays and graphics. Not Achieved
c) Develop program by applying various object-oriented concepts. Not Achieved
d) Use form controls with validation to collect user’s input. Achieved
e) Perform database operations in PHP. Achieved
Dated Signature:
Code
Index.html
<!doctype html>
<html lang="zxx">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Project</title>
<!-- Template CSS -->
<link rel="stylesheet" href="assets/css/style-starter.css">
<!-- Template CSS -->
<link href="//fonts.googleapis.com/css?family=Oswald:300,400,500,600&display=swap"
rel="stylesheet">
<link href="//fonts.googleapis.com/css?family=Lato:300,300i,400,400i,700,900&display=swap"
rel="stylesheet">
<!-- Template CSS -->
</head>
<body>
<!--w3l-banner-slider-main-->
<section class="w3l-banner-slider-main inner-pagehny">
<div class="breadcrumb-infhny">
<div class="top-header-content">
<header class="tophny-header">
<div class="container-fluid">
name="form"> address</p>
</ul>
<!--//right-->
<div class="overlay-login text-left">
<button type="button" class="overlay-close1">
<i class="fa fa-times" aria-hidden="true"></i>
</button>
<div class="wrap">
<h5 class="text-center mb-4">Login Now</h5>
<div class="login-bghny p-md-5 p-4 mx-auto mw-100">
<!--/login-form-->
<form action="index.html" method="post"
<div class="form-group">
<p class="login-texthny mb-2">Email
id="exampleInputEmail1" aria-describedby="emailHelp"
text-muted">We'll never share your email
placeholder="" required="">
<small id="emailHelp" class="form-text
</div>
<div class="form-group">
<p class="login-texthny mb-2">Password</p>
<input type="password" class="form-control" id="exampleInputPassword1" placeholder=""
required="">
</div>
<div class="form-check mb-2">
<div class="userhny-check">
<label class="check-remember container">
<input type="checkbox" class="form-check"> <span class="checkmark"></span>
<pclass="privacy-policy">Remember
me</p>mb-4">Sign In</button>
</label>
<div class="clearfix"></div>
</div>
</div>
<button type="submit" class="submit-login btn
</form>
<!--//login-form-->
</div>
<!---->
</div>
</div>
</div>
</div>
<!--/nav-->
<nav class="navbar navbar-expand-lg navbar-light">
<div class="container-fluid serarc-fluid">
<a class="navbar-brand" href="index.html"> E<span class="lohny"></span>-BOOK</a>
<!-- if logo is image enable this
<a class="navbar-brand" href="#index.html">
<img src="image-path" alt="Your logo"
title="Your logo" style="height:35px;" />
</a> -->
<!--/search-right-->
<div class="search-right">
</div>
<li class="nav-item">
<a class="nav-link" href="issue.php">Issue</a>
</li>
<li class="nav-item">
<a class="nav-link" href="return.php">Return</a>
</li>
</ul>
</div>
</div>
</nav>
<!--//nav-->
</header>
<div class="breadcrumb-contentnhy">
<div class="container">
<nav aria-label="breadcrumb">
<h2 class="hny-title text-center">Knowledge Grows on the Bookshelf
of Patience</h2>
</nav>
</div>
</div>
</div>
</section>
<section class="w3l-grids-hny-2">
<!-- /content-6-section -->
<div class="grids-hny-2-mian py-5">
<div class="container py-lg-5">
<div class="boxhny-content">
<h3 class="title">Book
</div>
</a>
</div>
<h4><a href="https://www.w3schools.com/cpp/cpp_intro.asp">C++<br>Programming</a></h4>
</div>
class="title">Book</h3>
<div class="boxhny-content">
<h3
</div>
</a>
</div>
<h4><a href="https://www.w3schools.com/c/c_intro.php?external_link=true">
C<br> Programming</a></h4>
</div>
<div class="col-lg-2 col-md-4 col-6 welcome-image">
<div class="boxhny13">
<a href="#URL">
img
<div class="boxhny-content">
<h3
</div>
</a>
</div>
<h4><a href="https://www.geeksforgeeks.org/best-books-to-learn-java-for-beginners-and-experts/"
>Java<br> Programming</a></h4>
</div>
<div class="col-lg-2 col-md-4 col-6 welcome-image">
<div class="boxhny13">
<a href="#URL">
<img
src="assets/images/advaced java.webp" class="img-fluid" alt="" />
<div class="boxhny-content">
<h3
class="title">Book</h3>
</div>
</a>
</div>
</div>
<div class="col-lg-2 col-md-4 col-6 welcome-image">
<div class="boxhny13">
<a href="#URL">
<img
src="assets/images/data.jpg" class="img-fluid" alt="" />
class="title">Book</h3>
<div class="boxhny-content">
<h3
</div>
</a>
</div>
<h4><a href="https://www.geeksforgeeks.org/best-data-structures-and-algorithms-books/">
Data<br> Structure</a></h4>
</div>
<div class="col-lg-2 col-md-4 col-6 welcome-image">
<div class="boxhny13">
<a href="#URL">
<img
<h4><a href="https://www.w3schools.com/php/php_filter_advanced.asp">
Advanced<br> PHP</h4>
</div>
</div>
</div>
</div>
<script>
// When the user scrolls down 20px from the top of the document, show the button window.onscroll =
function () {
scrollFunction()
};
function scrollFunction() {
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
document.getElementById("movetop").style.display = "block";
} else {
document.getElementById("movetop").style.display = "none";
}
}
// When the user clicks on the button, scroll to the top of the document function topFunction() {
document.body.scrollTop = 0;
document.documentElement.scrollTop = 0;
}
</script>
</body>
</html>
<script src="assets/js/jquery-3.3.1.min.js"></script>
<script src="assets/js/jquery-2.1.4.min.js"></script>
<!--/login-->
<script>
$(document).ready(function () {
$(".button-log a").click(function () {
$(".overlay-login").fadeToggle(200);
$(this).toggleClass('btn-open').toggleClass('btn-close');
});
});
$('.overlay-close1').on('click', function () {
$(".overlay-login").fadeToggle(200);
$(".button-log a").toggleClass('btn-open').toggleClass('btn-close'); open = false;
</script>
<!--//login-->
<script>
// optional
});
</script>
<!-- cart-js -->
});
$('#customerhnyCarousel').carousel({
interval: 5000
<script src="assets/js/minicart.js"></script>
<script> transmitv.render();
transmitv.cart.on('transmitv_checkout', function (evt) { var items, len, i;
mainClass: 'my-mfp-zoom-in'
});
});
</script>
<!--//search-bar-->
<!-- disable body scroll which navbar is in active -->
<script>
$(function () {
$('.navbar-toggler').click(function () {
$('body').toggleClass('noscroll');
})
});
</script>
<!-- disable body scroll which navbar is in active -->
<script src="assets/js/bootstrap.min.js"></script>
AddBook.php
<?php if(isset($_POST['submit'])){
include "dbconnect.php";
$bookid = $_POST['bookid'];
$title = $_POST['title'];
$genre = $_POST['genre'];
$sql = "INSERT INTO book (bookid, title, genre) VALUES ('$bookid', '$title', '$genre')";
mysqli_close($conn);
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
form {
background-color: #fff; padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); width: 300px;
}
label {
display: block; margin-bottom: 8px;
}
input, select {
width: 100%; padding: 8px;
margin-bottom: 16px; box-sizing: border-box;
}
button {
background-color: #4caf50; color: #fff;
padding: 10px; border: none; border-radius: 4px; cursor: pointer; width: 100%;
}
<body>
<label for="genre">Genre:</label>
<select id="genre" name="genre" required>
<option value="fiction">Fiction</option>
<option value="nonfiction">Non-Fiction</option>
<option value="mystery">Mystery</option>
</select>
</body>
</html>
<?php if(isset($_POST['submit'])){
include "dbconnect.php";
$bookid = $_POST['bookid'];
$title = $_POST['title'];
$genre = $_POST['genre'];
$sql = "INSERT INTO book (bookid, title, genre) VALUES ('$bookid', '$title', '$genre')";
if(mysqli_query($conn, $sql)){ echo '<script>
alert("Book added successfully!"); window.location.href = "index.html";
</script>';
} else{
echo "Error: " . $sql . "<br>" . mysqli_error($conn);
}
mysqli_close($conn);
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Add New Book Form</title>
<style>
body {
font-family: Arial, sans-serif; background-color: #f4f4f4; margin: 0;
padding: 0; display: flex;
align-items: center; justify-content: center; height: 100vh;
}
form {
background-color: #fff; padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); width: 300px;
}
label {
display: block; margin-bottom: 8px;
}
input, select {
width: 100%; padding: 8px;
margin-bottom: 16px; box-sizing: border-box;
}
button {
background-color: #4caf50; color: #fff;
padding: 10px; border: none; border-radius: 4px; cursor: pointer; width: 100%;
}
<label for="genre">Genre:</label>
<select id="genre" name="genre" required>
<option value="fiction">Fiction</option>
<option value="nonfiction">Non-Fiction</option>
<option value="mystery">Mystery</option>
</select>
<button type="submit" name="submit">Add Book</button>
</form>
</body>
</html>
Book.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>View Books</title>
<style>
body {
font-family: Arial, sans-serif; background-color: #f4f4f4; margin: 0;
padding: 0; position: relative;
}
table {
border-collapse: collapse; width: 60%;
margin: 20px auto;
}
th,
td {
border: 1px solid #dddddd; text-align: left;
padding: 8px;
}
th {
background-color: #f2f2f2;
}
.top-right {
position: absolute; top: 10px;
right: 10px;
}
mysqli_close($conn);
?>
</tbody>
</table>
<a href="index.html" class="redirect-button">Go to Homepage</a>
</body>
</html>
MET’s Institute of Technology, Polytechnic, Nashik 26