Method I
<?php ob_start(); if(isset($_GET['elimina_id'])){ if (in_array($_GET['elimina_id'], $_SESSION['cart']) ) { $index = (array_keys($_SESSION['cart'], $_GET['elimina_id'])); $i = $index[0]; unset($_SESSION['cart'][$i]); header('location: cart.php'); } } ob_end_flush(); ?>
Method II
HTML: <meta http-equiv="refresh" content="0;url=http://www.site.com/cart.php"> JavaScript #1: <script>window.location = "http://www.site.com/cart.php";</script> JavaScript #2: <script>window.navigate("http://www.site.com/cart.php");</script>
Html, JAVA,DOTNET,Javascript, PHP, and JQuery Scripts and its issues with solutions
Showing posts with label header. Show all posts
Showing posts with label header. Show all posts
Saturday, 28 June 2014
PHP - Header redirect issue Occur in Live Server
Subscribe to:
Posts (Atom)