	<?php
	$idEvent = "CompletingForm";
	$button_event = $_POST["button_event"];
	
	if ($button_event == "Update Data") {
		$kontak_dagang_header = kontak_dagang_header($exhibitorID, $idEvent);
		/**
		$product_fav_hari_ini = $kontak_dagang_header["ValueFromForm"]["formValue"]["product_fav_hari_ini"];
		$saran = $kontak_dagang_header["ValueFromForm"]["formValue"]["saran"];
		$ttd_exhibitor = $kontak_dagang_header["ValueFromForm"]["formValue"]["ttd_exhibitor"];
		$ttd_organizer = $kontak_dagang_header["ValueFromForm"]["formValue"]["ttd_organizer"];
		 **/
		
        echo '
        <form name="formSubmit" id="formSubmit" class="form" action="'.$thisPage.'adm1n/'.$curPage1.'" method="post">
			<input type="hidden" name="action" id="action" value="entryForm" />
   		</form>';
		if (mysql_query($kontak_dagang_header["sql_update"])) {
			echo '
			<script type="text/javascript">
				document.getElementById(\'formSubmit\').submit(); 
			</script>';
		} else {
			die(mysql_errno($conn) . ": " . mysql_error($conn) . "\n");	
		}
	} else {
		$sql =
		"SELECT * FROM kontak_dagang_header WHERE header_id = '".$header_id."'";
		if ($hasil = mysql_query($sql)) {
			while ($data = mysql_fetch_array($hasil)) {
				$product_fav_hari_ini = $data["product_fav_hari_ini"];
				$saran = $data["saran"];
				$ttd_exhibitor = $data["ttd_exhibitor"];
				$ttd_organizer = $data["ttd_organizer"];
			}
		}
		$button_event = "Update Data";
		include ($thisUrl.'adm1n/functions/form_kelengkapan_data.php');
	}
	?>
