Hi Jason, thank you for the reply.
so the cancel button is working fine using the Insert_ID session?
onclick="document.location.href='tbl_mi_details_de tail.php?RefNo=<?php echo ((isset($_SESSION["Insert_ID"]))?$_SESSION["Insert_ID"]:""); ?>';" />
******* Yes that works OK
in this code, your using a form element:
tbl_mi_details_detail.php?RefNo=<?php echo ((isset($_POST["Insert_ID"]))?$_POST["Insert_ID"]:""); ?>
does that form element exist?
****** Yes Insert_ID is a hidden form element that uses the SESSION variable
did you try setting the value of the Insert_ID form element to use the session variable?
****** Yes - also tried your suggestion below
<input type="hidden" name="Insert_ID" id="Insert_ID" value="<?php echo ((isset($_POST["Insert_ID"]))?$_POST["Insert_ID"]:""); ?>" />
I have attached the whole form.