<?php require_once('open_connection.php');?>
<?php
					$invoice_ref_id = $_REQUEST['invoice_ref_id'];
			   		   $result1 = mysql_query("SELECT * from tbl_dir_fnb_invoice where invoice_ref_id='$invoice_ref_id' and vendor_id ='$vendor_id'");  
					 
                    $row=mysql_fetch_array($result1);
                    $invoice_ref_id=$row['invoice_ref_id'];
					$vendor_id=$row['vendor_id'];
                ?>
               
				<!--h2>Add spm_id to <?php echo $row['invoice_ref_id']?></h2-->
				<?php
						 $invoice_ref_id = $_POST['invoice_ref_id'];
					       $invoice_date = $_POST['invoice_date'];
					     $invoice_amount = $_POST['invoice_amount'];
					  

	mysql_query("UPDATE tbl_dir_fnb_invoice SET invoice_date ='".$invoice_date."',invoice_amount='".$invoice_amount."' where                invoice_ref_id='".$invoice_ref_id."'");
				echo "<script> alert('1 record updated');
				window.location.href='vendor_fnb_invoice.php?vendor_id=$vendor_id';
	</script>";
	mysql_close($con);
?>