Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //This is the showcart.php file
- session_start();
- require('header.php');
- define('DB_HOST', 'llll');
- define('DB_USER', 'llll');
- define('DB_PASSWORD', 'llll');
- define('DB_NAME', 'llll');
- $dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
- require('functions.php');
- echo '<h2>Your shopping cart</h2>';
- showcart(); //This function comes from the functions.php file
- if(isset($_SESSION['ordernum'])) {
- $query = "SELECT * FROM orderitems WHERE order_id = '" . $_SESSION['ordernum'] . "'";
- $result = mysqli_query($dbc, $query);
- $numrows = mysqli_num_rows($result);
- if($numrows >= 1) {
- echo '<h3><a href="checkoutaddress.php">Go to checkout</a></h3>';
- }
- }
- require('footer.php');
- ?>
Add Comment
Please, Sign In to add comment