I have a modal window that when opened, shows the option to click on another button, which says yes or no.
If I click Yes, I intend to destroy the PHP session.
How can I do this within the jQuery code that opens the modal window?
JQUERY:
$(document).ready(function(){
$('#modalLogout').click(function(){
$('#yes').click(function(){
// preciso de destruir a sessão <?php session_destroy(); ?>
});
});
});
I tried to use:
$(this).load("destroy.php");
And send to a PHP page but it did not work!