I have a php script that updates a mysql database. Once its done, I want to redirect back to the details page. I know that this can be done in a header redirect, but I can't get it to add the variable to the address. My code that I have is below.
<?php
include "../config.php";
$_GET["hiveid"] = $HiveID;
$_GET["hivename"] = $HiveName;
$_GET["hiveloca"] = $HiveLoca;
mysql_query("UPDATE hives SET HiveName='$HiveName', LocationID='$HiveLoca' WHERE HiveID='$HiveID'") or die (mysql_error());
$URL = "../hivedetails.php?HiveID=" . $HiveID;
header("Location: " . $URL);
?>
$_GET?$HiveID = $_GET["hiveid"];?$HiveID=$_GET["hiveid"];? not that there's any point simply creating new variables.