Welcome to the world of sessions! The answer you're looking for is to store your information in an array, and then set your session variable to the array. So, what you've got right now is something like this: $_SESSION['proID'] = 1; $_SESSION['colorID'] = 1; etc... Which is problematic for a ton of reasons, namely that doing it said way can lead to tons of session variables. The easy way: $_SESSION['proID'] = array(proID,proID,proID,etc...); $_SESSION['colorID'] = array(colorID,colorID,colorID,etc...); etc... I personally set/grab session variables early and late (i.e. I do minimal work directly with the session themselves), so I'd pass the session over to a variable and back in once you finish with it. -- Joe On Nov 18, 2009, at 6:52 PM, Qazi wrote: > hello experts > i want help for session variable.. > i am making a shoping cart with the help of sessions > > i have two tables one is product and other is product_atributs > in product > > id name dec price > 1 t-shirt shirt 5 > 2 shirt sutting shirt 6 > > and productAtibute table > > id proID ColorID SizeID Quantity > 1 1 1 1 5 > 2 1 2 1 5 > 3 1 1 2 5 > 4 1 2 2 5 > > and so on > > when i am going to select an item for shoping cart like > (proID=1 ,colorID=1,SizeID=1 and quanty=1) > this is the first entry for my cart > when i go to the next like > (proid=1.colorid=2,sizeid=1,quanty=1) > i want to add this to an other row. > and if i want to add another quantity in already added item then > what check will be and how .. i am very thank full to you all > plzzzzz help me ... i am very worried about it becoz i am new in > sessions... help me plzlzzzzzz > thanks > > [Non-text portions of this message have been removed] ------------------------------------ Are you looking for a PHP job? Join the PHP Professionals directory Now! http://www.phpclasses.org/jobs/ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-objects/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/php-objects/join (Yahoo! ID required) <*> To change settings via email: php-objects-digest@xxxxxxxxxxxxxxx php-objects-fullfeatured@xxxxxxxxxxxxxxx <*> To unsubscribe from this group, send an email to: php-objects-unsubscribe@xxxxxxxxxxxxxxx <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/