Statement

I would like to set a timeout on the alert message if the user didn't close the box within 15 seconds.

<?php
    if (isset($_SESSION['message'])): ?>
     <div id="Alert" class="alert alert-<?=$_SESSION['msg_type']?> alert-dismissible fade show" role="alert">
          <button type="button" class="close" data-dismiss="alert"><span style="font-size:1em;">&times;</span></button>
          <center><?php echo $_SESSION['message'];?></center>
          <?php unset($_SESSION['message']); ?>
     </div>
<?php endif ?>

<script>
//set timeout here...
</script>

0 Answers