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?? Quote Link to comment 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.