Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions 31_2013379_manvendra_singh/hobies.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> my hobbies</title>
</head>
<body>
<h3> MY Hobbies</h3>
<ol>
<li><a href="https://www.jiosaavn.com/song/aabaad-barbaad/L180SAJmTV4"> listening music</a></li>
<li><a href="https://www.sonyliv.com/dplnk?schema=...​"> watching moive</a>
<li>playing cricket </li>
<li> travelling</li>
</ol>

</body>
</html>
1 change: 1 addition & 0 deletions 31_2013379_manvendra_singh/web practical
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

14 changes: 14 additions & 0 deletions End Term Practicals/CSED/31_2013379_manvendra_singh/Q1/config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php
$hostname="localhost";
$username="root";
$password="";
$database="BookStore";

$conn=mysqli_connect($hostname, $username ,$password ,$database);
if($conn){
echo "Connection Successful...";
}
else{
echo "Connection failed..." +mysqli_connect_error();
}
?>
71 changes: 71 additions & 0 deletions End Term Practicals/CSED/31_2013379_manvendra_singh/Q1/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?php
include('config.php');
?>
<?php
if(isset($_POST['submit']))
{
$bookName = $_POST['bname'];
$authorName = $_POST['aname'];
$isbnNumber = $_POST['isbn'];
$publisherName = $_POST['pname'];
$booktype = $_POST['btype'];
$vol = $_POST['volume'];
$pyear = $_POST['pyear'];

$sql = "INSERT INTO user (bookName,authorName,isbnNumber,publisherName,bookType,publishYear,volume)
VALUES ('$bookName','$authorName','$isbnNumber', '$publisherName','$booktype', '$pyear','$vol' )";
if (mysqli_query($conn, $sql)) {
echo "New record has been added successfully !";
} else {
echo "Error: " . $sql . ":-" . mysqli_error($conn);
}
mysqli_close($conn);
}
?>


<html>
<head>
<title>
Book
</title>
</head>
<body>
<form method="POST" action="index.php">
Book Name <input type="text" placeholder="Enter Book Name" name="bname"><br><br>
Author Name <input type="text" placeholder="Enter Author Name" name="aname"><br><br>
ISBN Number <input type="text" placeholder="Enter ISBN Number" name="isbn"><br><br>
Publisher Name <input type="text" placeholder="Enter Publisher Name" name="pname"><br><br>
<br>Publication Year<br>
<select name="pyear">
<option value="2010">2010</option>
<option value="2011">2011</option>
<option value="2012">2012</option>
<option value="2013">2013</option>
<option value="2014">2014</option>
<option value="2015">2015</option>
<option value="2016">2016</option>
<option value="2017">2017</option>
<option value="2018">2018</option>
<option value="2019">2019</option>
<option value="2020">2020</option>
<option value="2021">2021</option>
</select><br>
<br> Book Type <br>
Action <input type="radio" value="Action" name="btype"><br>
Adventure <input type="radio" value="Adventure" name="btype"><br>
Classics <input type="radio" value="Classics" name="btype"><br>
Comic Book <input type="radio" value="Comic_Book" name="btype"><br>
Graphic Novel <input type="radio" value="Graphic_Novel" name="btype"><br>
Detective <input type="radio" value="Detective" name="btype"><br>
Mystery <input type="radio" value="Mystery" name="btype"><br>
Historical Fiction <input type="radio" value="Historical_Fiction" name="btype"><br>
Horror <input type="radio" value="Horror" name="btype"><br>
Literary Fiction <input type="radio" value="Literary_Fiction" name="btype"><br>
<br>
Number Of Pages<br>
<input type="range" name="volume" min="200" max="400"> <br><br>
<input type="submit" name="submit">
</form>
</body>
</html>
14 changes: 14 additions & 0 deletions End Term Practicals/CSED/31_2013379_manvendra_singh/Q2/config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php
$hostname="localhost";
$username="root";
$password="";
$database="BookStore";

$conn=mysqli_connect($hostname, $username ,$password ,$database);
if($conn){
echo "Connection Successful...";
}
else{
echo "Connection failed..." +mysqli_connect_error();
}
?>
61 changes: 61 additions & 0 deletions End Term Practicals/CSED/31_2013379_manvendra_singh/Q2/fetch.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?php
include('config.php');
?>

<!-- Code to fetch data -->
<?php

$sql="SELECT * FROM users";
$result=mysqli_query($conn, $sql);

if($result!==false && $result->num_rows > 0){
?>

<table border="1px">
<thead>
<tr>
<th>BOOK ID</th>
<th>Book Name</th>
<th>Author</th>
<th>ISBN</th>
<th>Publisher</th>
<th>Publiction Year</th>
<th>Pages</th>
<th>Book Type</th>

</tr>
</thead>
<tbody>
<?php
while($row = $result->fetch_array()){?>
<tr>
<td><?php echo $row[0]?></td>
<td><?php echo $row[1]?></td>
<td><?php echo $row[2]?></td>
<td><?php echo $row[3]?></td>
<td><?php echo $row[4]?></td>
<td><?php echo $row[5]?></td>
<td><?php echo $row[6]?></td>
<td><?php echo $row[7]?></td>
<td><a href="edit.php?id=<?php echo $row[0]?>">
<input type="button" value="Edit"></a></td>
<td><input type="button" value="delete"></td>

</tr>
<?php } ?>
</tbody>
</table>
<?php }
?>


<html>

<head>

<title>User Details</title>
</head>
<body>

</body>
</html>