-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpublish_book.php
More file actions
71 lines (54 loc) · 1.65 KB
/
Copy pathpublish_book.php
File metadata and controls
71 lines (54 loc) · 1.65 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php session_start();?>
<html>
<title>Published Page</title>
<link rel="stylesheet" href="style/profile_history.css"/>
<body>
<div class="main_wrapper">
<!--Header -->
<div class="header">
<!--Login and Sign up Links -->
<div class="Account_header"> (Welcome <?php echo $_SESSION['my_user_name'];?> ) <a href="index.php" > Logout</a> </div>
<h1 id="title">UBooks </h1>
</div>
<!--End Header -->
<!-- Menu Bar -->
<hr>
<div class="menu_bar">
<ul id="menu">
<li><a href="authentication_Page.php">Home</a></li>
<li><a href="profile_Page.php">Profile</a></li>
<li><a href="history_Page.php">History</a></li>
<li><a href="sell_Page.php">Sell</a></li>
</ul>
</div>
<hr>
<!--List of Books-->
<div class="content_wrapper">
<div id="content_area">
<!--display database content-->
<?php
require_once('PHP/publish_functions.php');
$title= $_POST['title'];
$isbn_10=$_POST['isbn_10'];
$author= $_POST['author'];
$subject=$_POST['subject'];
$edition=$_POST['editions'];
$publish_date= $_POST['publish_date'];
$pay_method=$_POST['pay_method'];
$delivery_method= $_POST['delivery_method'];
$price=$_POST['price'];
$my_ID=$_SESSION['my_user_ID'];
if(!$title || !$isbn_10 || !$author || !$subject || !$publish_date || !$pay_method || !$delivery_method || !$price){
echo' <p>You have not filled all the information required. Please Try again<p>';
}
else{
publish_book();
echo' <p>You have successfully Published a Book.<p>';
}
?>
</div>
</div>
<div id="footer"></div>
</div>
</body>
</html>