<script language='Javascript'>
function confirmacaoSair() {
var resposta = confirm('".$_SESSION['nome'].", tem que certeza que quer sair?');
if (resposta == true) {
unset({$_SESSION['nome']});
unset({$_SESSION['matricula']});
{session_destroy()};
window.location.href = 'index.php';
}
}
</script>
This way it is not working, but my question is whether it works what I want to do.