?> </h1> <h2> <?php $output = ""; if (is_logged_in()) { $output = "<a href=\"sell.php?id="; //create a link to sell.php that holds the book id $output .= urlencode($book_id); $output .= "\">"; $output .= "Sell This Book"; $output .= "</a><br /><br />"; } else { $output = cannot_buy_or_sell(); } echo $output; ?> </h2> <br /> <?php // Build query for finding the name if (is_logged_in()) { $query = "SELECT * "; //prepare a query that displays all the sellers of the book $query .= "FROM sell "; $query .= "WHERE book_id = {$book_id}"; $seller_set = mysqli_query($connection, $query); confirm_query($seller_set); $output = "<h2>Buy This Book:</h2><h3>";
//find page user is in ?> <!--<div id="main"> </ul> </div> <!--end categories and navigation--> <div id="page"><br /> <!--page of textbooks, each occupies a square in space--> <br /> <!--sorting selection should go here--> <?php echo index_header(); //create the buttons of categories and subjects ?> <h2> <?php if (!is_logged_in()) { echo cannot_buy_or_sell(); } ?> </h2> <!-- books--> <?php echo index_body(); ?> </div> <!-- div for page content--> <!--</div>--> </body> </html> <?php ob_end_flush();