airdee Posted November 8, 2006 Share Posted November 8, 2006 hi all. just a quick question on how to execute $obj_cart->add_itemsToCart($pcode,$pname,'0'); on succeeding events? like:1. $obj_cart->add_itemsToCart($pcode,$pname,'0');2. $obj_cart->add_itemsToCart($pcode,$pname,'0');3. $obj_cart->add_itemsToCart($pcode,$pname,'0');4. $obj_cart->add_itemsToCart($pcode,$pname,'0');... and so onswitch($action){ case $action="cart": $pcode=$state."-".$area; $pname=$getstate." | ".$getarea; include "cart.php"; $obj_cart = new ClassCart(); $obj_cart->add_itemsToCart($pcode,$pname,'0'); $cart_table = $obj_cart->display_itemCart(); echo "<tr>"; echo "<td colspan='2'>"; echo "<table align='center' width='80%' border='0'>"; echo $cart_table; echo "</table>"; echo "</td>"; echo "</tr>"; break; }?> Link to comment https://forums.phpfreaks.com/topic/26535-how-to-write-succeedingly/ Share on other sites More sharing options...
btherl Posted November 8, 2006 Share Posted November 8, 2006 Try[code]case 'cart':[/code]The rest looks ok. Link to comment https://forums.phpfreaks.com/topic/26535-how-to-write-succeedingly/#findComment-121412 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.