ragrim Posted December 1, 2011 Share Posted December 1, 2011 Hi, Im building a cart system and i have sessions for my cart and for my login, i find as soon as i login im getting a blank line added to my cart so im assuming its conflicting with my login session. This is my login session $_SESSION['SESS_MEMBER_ID'] And my cart session is $_SESSION['cart'] The code im using to display my cart is $cart = $_SESSION['cart']; foreach( $cart as $key => $value){ echo "<td>" . $key . "</td><td><input type='text' value='" . $value . "'</td><td>Delete</td></tr>"; } What am i doing wrong here? any help would be appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/252262-working-with-multple-sessions/ Share on other sites More sharing options...
requinix Posted December 2, 2011 Share Posted December 2, 2011 How are you initializing the cart when the user logs in? Quote Link to comment https://forums.phpfreaks.com/topic/252262-working-with-multple-sessions/#findComment-1293300 Share on other sites More sharing options...
ragrim Posted December 2, 2011 Author Share Posted December 2, 2011 Im not actually sure, im just using a session_start() at the top of my index page. Quote Link to comment https://forums.phpfreaks.com/topic/252262-working-with-multple-sessions/#findComment-1293303 Share on other sites More sharing options...
requinix Posted December 2, 2011 Share Posted December 2, 2011 It would be nice if you could find that out. Quote Link to comment https://forums.phpfreaks.com/topic/252262-working-with-multple-sessions/#findComment-1293598 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.