included session code doesnt work included session code doesnt work
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

included session code doesnt work

Started by sporkit, August 04, 2004, 07:02:53 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sporkit

when i modded my site i just included a custom site_header.php and site_footer.php page to wrap around my gallery.  the page im working on (shown here) has a flash banner at the top of the page.  there is actually 2 of them, one that plays when you visit the page and another that loops till you leave the site.  to make this work i used a session that told my server to display the intro when a user visits the site and play the second looping one till they leave.

here is the code i used to do this.  at the top of the included page is <?php session_start(); ?>
<html>
<head>
<title>de la fate</title>
<link href="/dsu/style.css" rel="stylesheet" type="text/css">... blah blah

and around the flash banner is this.  <?php 

if ( $lgo_ply == )
{
echo ('
  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="347" height="133">
          <param name="movie" value="/dsu/images/fate_loop.swf">
          <param name="quality" value="high">
          <embed src="/dsu/images/fate_loop.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="347" height="133"></embed>
  </object>
'
);
}
else
{

echo ('
  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="347" height="133">
          <param name="movie" value="/dsu/images/fate_intro.swf">
          <param name="quality" value="high">
          <embed src="/dsu/images/fate_intro.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="347" height="133"></embed>
  </object>
'
);
}


  
$_SESSION['lgo_ply'] = 1;


?>


if $lgo_ply has a value of 1 in it then it plays the loop flash banner.  unfortunatly something must be happening to this variable since it is constantly playing the intro.  im not sure what else i can explain but if you need to see other code then ill post it.  heck, maybe there is a better way of doing this anyway.  thanks for your help. :)