Login   Register  
PHP Classes
elePHPant
Icontem

File: index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of imran ahmed rahi  >  Class Cart  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description: An example file to view the working of the class.
Class: Class Cart
Manage the items of a shopping cart
Author: By
Last change:
Date: 9 years ago
Size: 831 bytes
 

Contents

Class file image Download
<?php
/*#############################=============================>

Project Name    : 
Purpose            : 
Developed By    : Imran Rahi
Created Date    : 

<=============================###############################*/
include "ClassCart.php";

$obj_cart = new ClassCart();

$obj_cart->add_itemsToCart(10,'colgate','55.60');
$obj_cart->add_itemsToCart(20,'tooth brush','129.00');
$obj_cart->add_itemsToCart(30,'books','24.35');

$cart_table $obj_cart->display_itemCart();

# Following comments can be removed to update the cart i.e  
# removing item id 10 and 20.

/*
print "newly updated <br>";
$arr_item_id = array (10,30);
$obj_cart->update_itemInCart($arr_item_id);

$cart_table = $obj_cart->display_itemCart();
*/
?>
<html>
 <table border=1 width="100%">
  <?php print $cart_table?>
 </table>
</html>