dc_jt Posted March 10, 2008 Share Posted March 10, 2008 Im doing a shopping basket and Ive got an image which must only be displayed if $_SESSION['basket'][1475] is set or $_SESSION['basket'][1476] is set AND no other products are set in the session for example $_SESSION['basket'][1477], $_SESSION['basket'][1478], $_SESSION['basket'][1479] etc. Whats the best way to do this? I tried the following but it doesnt seem to work: if($_SESSION['store']['store_id'] || (isset($_SESSION['basket'][1475]) || (isset($_SESSION['basket'][1476]) && !isset($_SESSION['basket'][1468])))){?> By the way I also need it to be shown if $_SESSION['store']['store_id'] is set. Hope this makes sense. Thanks Link to comment https://forums.phpfreaks.com/topic/95355-session-help/ Share on other sites More sharing options...
soycharliente Posted March 11, 2008 Share Posted March 11, 2008 if (isset($_SESSION['basket'][1475]) || isset($_SESSION['basket'][1476]) || isset($_SESSION['store']['store_id'])) seems right to me. Link to comment https://forums.phpfreaks.com/topic/95355-session-help/#findComment-489202 Share on other sites More sharing options...
l0ve2hat3 Posted March 11, 2008 Share Posted March 11, 2008 what exacly is your code doing? Link to comment https://forums.phpfreaks.com/topic/95355-session-help/#findComment-489206 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.