Click to See Complete Forum and Search --> : CSS and PHP Session


ndorfnz
12-27-2006, 11:57 PM
Ok, I currently am using the following within my style.css to format some hyperlinks.


<!--FOR THE SMALL LINK TO LOG IN OR NEW USER AT THE TOP OF THE MAIN PAGE!-->
A.small:link {
color: #666666;
text-decoration: none;
font-family: Verdana;
font-size: 7pt;
}

A.small:visited {
color: #666666;
text-decoration: none;
font-family: Verdana;
font-size: 7pt;
}

A.small:active {
color: #666666;
text-decoration: none;
font-family: Verdana;
font-size: 7pt;
}

A.small:hover {
color: #FFFFFF;
font-family: Verdana;
font: bold;
font-size: 7pt;

}


This works fine unless the php page starts with a:
session_start();

Then when I am using parameters within an existing hyperlink, the css formatting doesn't apply???!!

An example of what the hyperlink looks like when the css formatting doesn't apply:
<a class="small" href="/content/home/index.php?subMenu=contact&PHPSESSID=b7fb27f7a2726474b19519eae0739edd" target="mainWindow">contact</a>

What's weird to me is this is still a hyperlink so why is the css ignored?

It's only when the PHPSESSID adds itself to the .php?parameter that it no longer works. If a link doesn't contain this, it works fine!

Appreciate any input!

Kudose
12-30-2006, 03:56 AM
The easiest way to resolve this issue would be to but this code at the top of your scripts.

ini_set('session.use_trans_sid', false);

It will stop automatically adding the PHPSESSID from the URLs