Thank you very much for your reply. Well I will explain this senario little further with a simple table structure,
temp_cart
id (auto generated) primary key
session_Id
date_time
temp_cart_details
id (auto generated) primary key
temp_cart_id
pro_id
qty
so as for the temp table solution i will use tables like above where when ever a user access a site i create him a session Id and when he add a product into the cart i store his session details in the 'temp_cart' table and products in the 'temp_cart_details' table.
but thats not my problem. My problem is, is this method efficent? because i can do the same thing without this two tables, using session variable. for example i can create a string to hold product details.
Ex:
$pro_details = 1|2,5|1;
where 1 and 5 is the product id`s and 2 and 1 is the quantity. so when ever user add an item i can concatenate those values to this string and store it in a session variable.
so im just wondering whats the best practice?
hope this is clear enough for you.
regards,
Niroshan