Jump to content

Internet Explorer+APache and PHP not working


gnawz

Recommended Posts

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?

Link to comment
Share on other sites

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.

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.