Forum Moderators: coopster

Message Too Old, No Replies

How can variable be Carried Through PHP Shoping Cart Using Sessions

How can I do this above subj ect Please Help

         

fadanash

11:56 pm on Jan 8, 2010 (gmt 0)

10+ Year Member



How Can I get this Done i need help on this topic
<?php
session_start();
$_SESSION['Cart'] = array();
$new_arr = array_push($_SESSION['Cart'],$prod);

what next......
need some help please
thanks

TheMadScientist

8:51 pm on Jan 10, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hi fadanash,

Welcome to WebmasterWorld!

Really not sure how to help you here... You're appending the variable $prod after the empty $_SESSION['Cart'] on the $new_arr, which looks to me like it leaves you with essentially the same as:

$new_arr[0]='';
$new_arr[1]='';

I really don't understand what you're trying to do or hope to accomplish, so there's not much I can do to help...