Hi There,
I am having trouble with an Undefined index error, I don’t understand why it is not working as I have used a similar element before. The error I am getting is Notice: Undefined index: PartID in /home/bkirk4747/public_html/php/partsums.php on line 26
Line 26 is //Get Part_Number
$iPartID = $_GET[“PartID”];
[php]// Before using $_POST[‘value’]
if (isset($_GET[‘PartID’]))
{
// Instructions if $_POST[‘value’] exist
}
//Get Part_Number
$iPartID = $_GET[“PartID”];
ECHO “<img src=“http://www.brickbybricks.ca/php/".$iPartID.".png”>”;
$oorders = mysql_query("
SELECT Parts.PartID, Colors.Color_Name, Parts.Part_Name, Categories.Category_Name, Sum(Orders.Qty) AS SumOfQty
FROM Stores
LEFT JOIN Colors
LEFT JOIN Categories
LEFT JOIN Currencies
LEFT JOIN Parts
LEFT JOIN Orders
ON Parts.PartID = Orders.PartID
ON Currencies.CurrencyID = Orders.CurrencyID
ON Categories.CategoryID = Orders.CategoryID
ON Colors.ColorID = Orders.ColorID
ON Stores.StoreID = Orders.StoreID
GROUP BY Parts.PartID, Colors.Color_Name, Parts.Part_Name, Categories.Category_Name
ORDER BY Colors.Color_Name, Categories.Category_Name;
") or die(mysql_error());
ECHO “
ECHO “
Part# | ”;
Color Name”; ECHO “ | ”;
Part Name”; ECHO “ | ”;
Category Name”; ECHO “ | ”;
Total Ordered”; ECHO “ | ”;
”.$row[‘PartID’]." | ";”.$row[‘Color_Name’]." | ";”.$row[‘Part_Name’]." | ";”.$row[‘Category_Name’]." | ";”.$row[‘SumOfQty’]." | ";
}
?>
The fields exist in a Mysql database, and I have checked to make sure that the fields have information in them. So I am stumped.