Solved

Show Splah DIV only once per session

Posted on 2009-05-05
1
857 Views
Last Modified: 2012-05-06
Could someone show me a simple example of how to show a splash div only once per session? I am using php, but the example could be any server side code.

Thanks. I am pulling my hair out on this one!
0
Comment
Question by:edvinson
1 Comment
 
LVL 39

Accepted Solution

by:
Roger Baklund earned 500 total points
Comment Utility
Try this:
<?php

session_start();

?>

<html><head>

# html head code here

</head>

<body>

# more code here

<?php

if(!isset($_SESSION['splash_was_displayed'])) {

  $_SESSION['splash_was_displayed'] = true;

?><div class="splash">

(Splash content)

</div>

<?php } ?>

Open in new window

0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now