All pastes #77178 Raw Edit

Mine

public text v1 · immutable
·published 2006-07-02 19:09 UTC
rendered paste body
<?php
// Include MySQL class
require_once('inc/mysql.class.php');
// Include database connection
require_once('inc/global.inc.php');
// Include functions
require_once('inc/functions.inc.php');
// Start the session
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
	
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<title>Shopping Cart Demo - BCB</title>
	<link rel="stylesheet" href="css/styles.css" />
</head>
<body>
<?php

echo "<div id=\"shoppingcart\">";
echo "<h1>Your Shopping Cart</h1>";
echo writeShoppingCart();
echo "</div>";

echo "<div id=\"booklist\">";

echo "<h1>Items Available In Our Store</h1>";
$sql = 'SELECT * FROM tblcart ORDER BY ProductID';
$result = $db->query($sql);
$output[] = '<ul>';
while ($row = $result->fetch()) {
	$output[] = '<li>'.$row['ProductID'].', '.$row['Category'].', '.$row['SubCat'].', '.$row['SubCat'].'<br /><a href="cart.php?action=add&ProductID='.$row['ProductID'].'">Add To Cart</a></li>';
}
$output[] = '</ul>';
echo join('',$output);

echo "</div>";

?>
</body>
</html>