#native_company# #native_desc#

Basket example using basket class

By Hugo Saavedra
on August 24, 2000

Version: 0.1

Type: Sample Code (HOWTO)

Category: Shopping Carts

License: GNU General Public License

Description: This example shows how to work with the class “basket”

include "basket.inc";
//The object need to be here, first of any output to the browser
// Refer to cookie reasons
$b=new basket();
case "A":
case "R":

<body text="#000080" link="#0000FF" vlink="#800080" alink="#FF0000" bgcolor="#FFFFFF">
ID	ITEM		Price
23	Notebook 	3500	<a href="<? echo $PHP_SELF; ?>?action=A&id=23&q=1">Add</a>
10	Pad		10	<a href="<? echo $PHP_SELF; ?>?action=A&id=10&q=1">Add</a>

if(!$b->empty) {
echo "Items in your shopping cart:<br>ID	ITEM	Q<br>";
{ echo "$x	NN	$y	<a href="$PHP_SELF?action=R&id=$x">Remove</a><br>";