Let me clear the things:
I m creating a little e-commerce script for a phone selling website, when the user add a phone to his cart the phone id will saved into session, if the user adds more than a phone to his cart the session data will be 1,2,5,10. when he checks the cart the phone name and the price should show from the database. Now here is my problem. I cannot show the data from the database when more than a phone in the cart. please tell me what to do?
also, I need to plus the value of the price as total price. but can't make it through as these value are with while function.
I m creating a little e-commerce script for a phone selling website, when the user add a phone to his cart the phone id will saved into session, if the user adds more than a phone to his cart the session data will be 1,2,5,10. when he checks the cart the phone name and the price should show from the database. Now here is my problem. I cannot show the data from the database when more than a phone in the cart. please tell me what to do?
PHP Code:
$myshelf = $_SESSION['cart_user'];
$query = "SELECT * FROM phone_info WHERE id IN ($myshelf)";
while ($row = mysql_fetch_array($result)) {
}
Comment