Codice PHP:
echo "<script>var asd = confirm(\"Benvenuto\");
if ((asd) || (!asd)) {
 location.href='index.php';
}
</script>"