davey_b_ Posted April 23, 2008 Share Posted April 23, 2008 The code works fine for selecting between the currencies but here's the problem... If I leave echo "<script type='text/javascript'> window.location='".$_SERVER['HTTP_REFERER']."';</script>"; enabled then the page just continously reloads, if I comment it out then all works but you can't delete any products from the cart - or anywhere else for that matter!!! Here's the code... <?php /*currency section starts*/ $currency_selected = ""; session_register('SESS_currency_type'); if(isset($_POST)) { foreach($_POST as $k => $v) $_SESSION['SESS_currency_type'] = $k; echo "<script type='text/javascript'> window.location='".$_SERVER['HTTP_REFERER']."';</script>"; // <-- problem line!! } else { if (!isset($_SESSION['SESS_currency_type']) OR $_SESSION['SESS_currency_type'] == "") { $_SESSION['SESS_currency_type'] = "1"; $currency_type = "1"; } } /*currency section ends*/ ?> Does anyone know whats wrong?? Link to comment https://forums.phpfreaks.com/topic/102508-currency-selection-delete-item-headache/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.