hello.
In my design I would like to have "flash file A" if this is the first time the user has browsed to this page this session and "flash file B" if they have already visited the site in their current session.
what is the best way to do this without getting tangled with any of the other sessions that CMSMS or phpBB may be using?
to be clear I am asking for help with the code as well since my php coding skills are lacking...
I have done this in school with ASP but php is new to me....
Thanks!
-Leav
Using Sessions in the header
-
Pierre M.
Re: Using Sessions in the header
Please try the module "random image" or "rotate ad" (I don't remember its name). May be it will help.
If your "newsession" is a strict requirement, you must set/test a "flashanim" volatile cookie, as with asp &co. It is just http extension whatever the programming language. (see php.net)
PM
If your "newsession" is a strict requirement, you must set/test a "flashanim" volatile cookie, as with asp &co. It is just http extension whatever the programming language. (see php.net)
PM
Re: Using Sessions in the header
I resorted to writing my own code.
put this in a user created tag and call it when you want:
however in some embed tags you need to call the same file name twice so you can use this:
that will show the same file name twice and then change back to second file name and show that for the rest of the session.
hope that helps someone that needs it....
-Leav
put this in a user created tag and call it when you want:
Code: Select all
session_start();
if ($_SESSION["flash_header"]==1)
{
$header = "header2.swf";
}
else
{
$_SESSION["flash_header"] = 1;
$header = "header1.swf";
}Code: Select all
session_start();
if ($_SESSION["flash_header"]==2)
{
$header = "header2.swf";
}
else
{
$_SESSION["flash_header"] += 1;
$header = "header1.swf";
}hope that helps someone that needs it....
-Leav

