My site is coming along nicely apart from...it works in FF and Chrome but not IE. I thought it might have been a javascript problem but I'm beginning to have my doubts. I now think it's a sql issue. My code...
<?php
header("Content-Type: text/plain");
$sID = $_GET["id"];
$sInfo1 = "";
$con = mysql_connect("localhost", "XXX", "XXX") or die(mysql_error());
mysql_select_db("MYDB") or die(mysql_error());
// Get a specific result from table
$result = mysql_query("SELECT * FROM maintable WHERE CatalogueNo=".$sID);
// keeps getting the next row until there are no more to get
while($sInfo1 = mysql_fetch_array( $result )) {
// Print out the contents of each row
echo $sInfo1['CatalogueNo']." ".$sInfo1['ItemNo']. " ".$sInfo1['Quantity']." ".$sInfo1['Unit']."<br />";
echo "Currently in stock " .$sInfo1['InStock']. ". (Max = " .$sInfo1['max'].") <br />";
}
$result1 = mysql_query("INSERT INTO tempdb(ItemNo, CatalogueNo, Quantity) SELECT CatalogueNo, ItemNo, Quantity FROM maintable WHERE CatalogueNo=".$sID);
if (!mysql_query($result1,$con))
{
die('Error: ' . mysql_error());
}
?>
What my main page does is search for a certain record from CatalogueNo and inserts that record into a temporary database. FF inserts as many records as many times as I want but IE inserts one record and that's it. If I choose a different record it will insert it. But I can't insert multiples of the same record.
Any one have any ideas why?