Animate on first entry only

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
palmere
Forum Newbie
Posts: 17
Joined: Fri Mar 19, 2004 5:33 pm

Animate on first entry only

Post by palmere »

I'm trying to decide if this is a Flash or a PHP question...

One way or the other, I'm designing a page that will have a reasonable amount of initial animation on the header file (not a splash screen, just the header graphic that will appear on all pages). What I would like to do is animate this once, on the initial entry of the page, but not the additional page loads.

The way I see it, there are three possible ways of doing this:

- Action script

- PHP Code w/ cookies that loads a separate file that doesn't have the initial animation.

- Some sent-from-above PHP code that can detect this sort of thing (depending on the site referral or some other crafty measure). :lol:

Let me know what you guys think about the options, or if I'm starkly looking over a simple solution. Have a good one.

Palmer
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

What I would do is use sessions

I would this on any page you want it to decide whether you want flash or image

Code: Select all

<?php

session_start();

if (!isset($_SESSION['header'])
            {
            $_SESSION['header'] = "set";
            echo " put your flash image here ";
            }else
            {
            echo " put your image here ";
            }

?>
Post Reply