Jump to content

CSS problem when using sessions


MikeFloutier

Recommended Posts

Hi,I just got to grips with using "sessions" to preserve some variables I need to pass from page to page (Thanks aspnetguy!).However, following an alteration to my CSS stylesheet file, I notice that whilst all my non-sessions pages are up to speed (on the style front), the sessions pages are still using the old stylesheet (which no longer exists - or so I thought - lol).My only thought was that my session has somehow preserved my old style sheet so I tried to use "session_destroy();" but I couldn't get it to work.HELP!! Please.Mike

Link to comment
Share on other sites

post the code to a non-session page and post hte code to your sessioned pageNote: any page that does any work with sessions must contain session_start() at the top
Thanks. This is a session page
<?phpsession_start();/*session_destroy();*/		$_SESSION['flowplayer_file_48kbps']="weddings_48kbps.flv";		$_SESSION['flowplayer_file_160kbps']="weddings_160kbps.flv";		$_SESSION['flowplayer_file_768kbps']="weddings_768kbps.flv";		$_SESSION['exhortation_name']="weddings";?><html><head><meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /><title>weddings</title><link rel="stylesheet" type="text/css" href="index.css" /></head><body> <?php include("banner.html"); ?><div id="main-text-heading">	<h1><?php echo $_SESSION['exhortation_name']; ?></h1>	<h3>				Listen > 		<?php		$exhortation_lo="weddings lo.mp3";		$exhortation_hi="weddings hi.mp3";		include("flash player.php");		?>				   		Watch > 		<a href="videoplayer_dialup.php"; title="Dial-up Internet"><img border="0" src="Images/TV_lo.bmp" width="24" height="24"></a>    		<a href="videoplayer_broadband_med.php"; title="Slow Broadband"><img border="0" src="Images/TV_med.bmp" width="24" height="24"></a>    		<a href="videoplayer_broadband_hi.php"; title="Fast Broadband"><img border="0" src="Images/TV_hi.bmp" width="24" height="24"></a>		</h3>		</div>		<div id="main-text">		<p>EXHORTATION TEXT  EXHORTATION TEXTEXHORTATION TEXTEXHORTATION TEXTEXHORTATION TEXT</p></div><?php include("left_menu.html"); ?><?php include("right_column.html"); ?></body></html>

And this is a non-session page

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html><head><meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /><title>exhortations subject index</title><link rel="stylesheet" type="text/css" href="index.css" /></head><body><?php include("banner.html"); ?><div id="main-text-heading">	<h1>Exhortations Index</h1>	<br>	</div>	<div id="main-text";>	<p style="text-align: center"><a href="dawn chorus.php">Dawn Chorus</a></p><br>	<p style="text-align: center"><a href="be ambidextrous.php">Be Ambidextrous</a></p> <br>	<p style="text-align: center"><a href="spiders web.php">Spider's Web</a></p> <br>		<p style="text-align: center"><a href="opportunity_knocks.php">Opportunity Knocks</a></p><br>		<p style="text-align: center"><a href="filename.php"><!--TITLE--></a></p><br></div><?php include("left_menu.html"); ?><?php include("right_column.html"); ?></body></html>

Thanks Mike

Link to comment
Share on other sites

There is no reason that the sessions should be interfering or having any effect on your stylesheet.This is happening with ALL pages that use sessions?
I think you've spotted it. There are 5 sessions pages and the only one that works has:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

in it so I guess that's it. I'm so new to all this that I haven't really found out what that stuff means. I just noticed that most of the time - up til now anyway - the page would work whether it was there or not. Time to slow down and do some studying I guess.Mike

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...