-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinsertion.php
More file actions
32 lines (29 loc) · 779 Bytes
/
Copy pathinsertion.php
File metadata and controls
32 lines (29 loc) · 779 Bytes
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
<?php
$title=$_POST['title'];
$price=$_POST['price'];
$author=$_POST['author'];
$con=mysqli_connect('localhost','root');
mysqli_select_db($con,'brm_db');
$q="INSERT INTO book (title,price,author) values ('$title',$price,'$author')";
$status=mysqli_query($con,$q);
mysqli_close($con);
?>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="homeStyle.css" />
<title> Insertion </title>
</head>
<body>
<h1> Book Record Management </h1>
<p><?php
if($status==1)
echo "Record inserted";
else
echo "Insertion failed";
?>
</p>
Do you want to insert more record?<a href="insertForm.php">Click here</a><br/>
Go back to home page <a href="home.php" > Click here </a>
</body>
</html>