<?php 

include "includes/conexao.php";

if(isset($_GET['pagar']) && !empty($_GET['pagar'])){
	
	$id_pagar = $_GET['pagar'];
	
	$now = date('Y-m-d');
	
	$actual = "UPDATE comissoes SET data='$now',status='Pago' WHERE id='$id_pagar'";
	$query = mysqli_query($con,$actual);
	
	if($query){
		
		echo "<script>alert('Pago com sucesso')</script>";
		echo "<script>window.open('comissoes.php','_self')</script>";
	}else{
		
		echo "<script>alert('Erroooooooooooo')</script>";
		echo "<script>window.open('comissoes.php','_self')</script>";
	}
	
}









?>