TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Nikita
NA
56
10k
the value can not store in the database.
Feb 18 2020 3:09 AM
<?php
session_start();
include
"connection.php"
;
include
"header.php"
;
?>
<!-- page content area main -->
<div
class
=
"right_col"
role=
"main"
>
<div
class
=
""
>
<div
class
=
"page-title"
>
<div
class
=
"title_left"
>
<h3>Plain Page</h3>
</div>
<div
class
=
"title_right"
>
<div
class
=
"col-md-5 col-sm-5 col-xs-12 form-group pull-right top_search"
>
<div
class
=
"input-group"
>
<input type=
"text"
class
=
"form-control"
placeholder=
"Search for..."
>
<span
class
=
"input-group-btn"
>
<button
class
=
"btn btn-default"
type=
"button"
>Go!</button>
</span>
</div>
</div>
</div>
</div>
<div
class
=
"clearfix"
></div>
<div
class
=
"row"
style=
"min-height:500px"
>
<div
class
=
"col-md-12 col-sm-12 col-xs-12"
>
<div
class
=
"x_panel"
>
<div
class
=
"x_title"
>
<h2>Add Books Info</h2>
<div
class
=
"clearfix"
></div>
</div>
<div
class
=
"x_content"
>
<form name=
"form1"
action=
""
method=
"post"
class
=
"col-lg-6"
>
<table
class
=
"table"
>
<tr>
<td><input type=
"text"
placeholder=
"Books Name"
class
=
"form-control"
name=
"booksname"
required=
""
> </td>
</tr>
<tr>
<td>Books Image<input type=
"file"
name=
"f1"
class
=
"form-control"
required=
""
></td>
</tr>
<tr>
<td><input type=
"text"
placeholder=
"Books Author Name"
name=
"author"
class
=
"form-control"
required=
""
></td>
</tr>
<tr>
<td><input type=
"text"
placeholder=
"Books Publication Name"
name=
"publication"
class
=
"form-control"
required=
""
></td>
</tr>
<tr>
<td><input type=
"text"
placeholder=
"Books Purchase Date"
name=
"bpurchasedt"
class
=
"form-control"
required=
""
></td>
</tr>
<tr>
<td><input type=
"text"
placeholder=
"Books Price"
name=
"price"
class
=
"form-control"
required=
""
></td>
</tr>
<tr>
<td><input type=
"text"
placeholder=
"Books Quantity"
name=
"bqty"
class
=
"form-control"
required=
""
></td>
</tr>
<tr>
<td><input type=
"text"
placeholder=
"Available Quantity"
name=
"aqty"
class
=
"form-control"
required=
""
></td>
</tr>
<tr>
<td><input type=
"submit"
name=
"submit1"
class
=
"btn btn-default submit"
value=
"Insert Books Details"
style="font-size: 16px;
font-weight: bold;
color: black; width:100%;background-color:blue;"></td>
</tr>
</table>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /page content -->
<?php
if
(isset(
$_POST
[
"submit1"
]))
{
$tm
=md5(time());
$fnm
=
$_FILES
[
"f1"
][
"name"
];
$dst
=
".books_image/."
.
$tm
.
$fnm
;
$dst1
=
"books_image/"
.
$tm
.
$fnm
;
move_uploaded_file(
$_FILES
[
"f1"
][
"tmp_name"
],
$dst
);
mysqli_query(
$link
,
"insert into add_books values ('','$_POST[booksname]','$dst1','$_POST[author]','$_POST[publication]','$_POST[bpurchasedt]','$_POST[price]','$_POST[bqty]','$_POST[aqty]','$_SESSION[librarian]')"
);
?>
<script type=
"text/javascript"
>
alert(
"Books Inserted Successfully"
);
</script>
<?php
}
?>
<?php
include
"footer.php"
;
?>
Reply
Answers (
0
)
Online accounting app WEB
Redirect home page