Hi there,
I have a form that updates a record in a database...At the moment on Update the user is directed to another page....
Is there a way i can parse the ID value that was just updated to the other page (like a hyperlink, e.g. ?recordID=<?php echo $row_record['ID']; ?>)......Because i need to parse the ID to the other page!
Is this possible??? If so how please??
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
$updateSQL = sprintf("UPDATE animal SET BreedID=%s, Age=%s, Sex=%s, Image=%s WHERE AnimalID=%s",
GetSQLValueString($_POST['select'], "text"),
GetSQLValueString($_POST['age'], "int"),
GetSQLValueString($_POST['sex'], "text"),
GetSQLValueString($_POST['image'], "text"),
GetSQLValueString($_POST['AnimalID'], "int"));
mysql_select_db($database_woodside, $woodside);
$Result1 = mysql_query($updateSQL, $woodside) or die(mysql_error());
$updateGoTo = "view_animal_details.php";
if (isset($_SERVER['QUERY_STRING'])) {
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
$updateGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $updateGoTo));
Thanks 🙂