<?php 
include "config.php";
 if($_GET['fld_reg_no']) {
	
	$delete = "update tbl_invoice set fld_invoice_status='Final' where fld_invoice_id='".$_GET['fld_invoice_id']."'";
	$delete_user=mysqli_query($connect,$delete) or die(mysqli_error($connect));

  $back="view_invoice_history.php?fld_reg_no=".$_GET['fld_reg_no']."&fld_status=".$_GET['fld_status']."&fld_status=".$_GET['fld_status'].""; 

  if ($delete) {
  	echo "<script>";
  	echo "window.alert('Final Amount Submited');";
  	echo "window.location.href='".$back."'";
  	echo "</script>";
  }else{
  	echo "<script>";
  	echo "alert('Final Amount not Submited');";
  	echo "window.location.href='".$back."'";
  	echo "</script>";
  }
}
 ?>