gnawz Posted September 29, 2008 Share Posted September 29, 2008 Hi I have a PHP application for managing sales My files in localhost work well when opened in Mozilla and Opera. However, they do not work well in IE... Some data is not displayed and the navigation gets messes. I keep getting "Page expired" when I browse through the applicatin. Anyone knows why? Quote Link to comment Share on other sites More sharing options...
dennismonsewicz Posted September 29, 2008 Share Posted September 29, 2008 make sure you have cookies turned on in IE Quote Link to comment Share on other sites More sharing options...
gnawz Posted September 29, 2008 Author Share Posted September 29, 2008 My cookies are on After posting data say add an Item, It is supposed to take me back to a page eg index.php but it doesn't in IE...It remains blank after posting though in Firefox it is okay. Quote Link to comment Share on other sites More sharing options...
trq Posted September 29, 2008 Share Posted September 29, 2008 We need to see the relevent code. Quote Link to comment Share on other sites More sharing options...
gnawz Posted September 29, 2008 Author Share Posted September 29, 2008 Some of my code is below. After posting, the browser remains blank in IE but works in Mozilla and Opera. My clients prefer IE for the system <?php require_once '../../functions.php'; $action = isset($_GET['action']) ? $_GET['action'] : ''; switch ($action) { case 'add' : addStock(); break; case 'modify' : modifyStock(); break; case 'delete' : deleteStock(); break; case 'deleteproduct' : deleteBrand(); break; default : echo "<META HTTP-EQUIV=\"refresh\" content=\"; URL=index.php\"> "; } /*Add Stock*/ function addStock() { $ProductName = $_POST['txtProductName']; $Quantity = $_POST['txtQuantity']; $sql = "INSERT INTO inspirationstock (ProductName, Quantity, DateAddedStock) VALUES ('$ProductName', '$Quantity', NOW())"; dbQuery($sql); //$errorMessage = "Stock added successfully"; echo "<META HTTP-EQUIV=\"refresh\" content=\"; URL=index.php\"> "; } //Modify Stock function modifyStock() { $StockID = (int)$_POST['hidStockID']; $Quantity = $_POST['txtQuantity']; $sql = "UPDATE inspirationstock SET Quantity = Quantity + '".$Quantity."', DateAddedStock = Now() WHERE StockID = '$StockID'"; dbQuery($sql); $errorMessage = "Stock modified successfully"; echo "<META HTTP-EQUIV=\"refresh\" content=\"; URL=index.php\"> "; } function deleteStock() { if (isset($_GET['StockID']) && (int)$_GET['StockID'] > 0) { $StockID = (int)$_GET['StockID']; } else { //header('Location: index.php'); echo "<META HTTP-EQUIV=\"refresh\" content=\"; URL=index.php\"> "; } $sql = "UPDATE inspirationstock SET Quantity = '0' WHERE StockID = $StockID"; dbQuery($sql); //$errorMessage = "Stock deleted successfully"; echo "<META HTTP-EQUIV=\"refresh\" content=\"; URL=index.php\">"; } function deleteBrand() { $Brand = $_POST['sltBrand']; $sql = "DELETE FROM inspirationstock WHERE ProductName = '$Brand'"; dbQuery($sql); echo "<META HTTP-EQUIV=\"refresh\" content=\"; URL=index.php\">"; } ?> Whether I use <? echo "<META HTTP-EQUIV=\"refresh\" content=\"; URL=index.php\">"; ?> or <? header('Location: index.php'); ?> it doesn't get back after posting. However the post is successful because when I use the browser back button, I find the data. 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.