I am trying to get it when someone presses the div that it will give an alert en after a view seconds it will redirect automatic.
My php code:
<?php
if(!isset($_SESSION['USER'])) { ?>
<a href="autohuren.php">
<div class="btn btn-outline btn-default" style="background-color:white;">
Huur deze auto.
</div>
</a>
<?php } ?>
This code will redirect but not when pressing the div. And their is no alert.
if(!isset($_SESSION['USER'])) {
echo "Please Log In First";
echo "<script>setTimeout(\"location.href = 'http://www.forobd2.com';\",1500);</script>";
} ?>
So what I want is that the div when pressed alert with a message and redirect after a few seconds. I hope someone can help me with this!