You could do it so when they click that link it will check if they're logged in and if they are it will update a row called "style" in your database with the style selected and when they login you grab the row and set the style.ashwood wrote:i was thinking when the user is logged in thats when they will be able to change the style.. when they log out it session_destroy() doesnt only log out but it now kills that style session should i leave it like that you think as the user can only change the style when they are logged in?
session colours
Re: session colours
Re: session colours
You could have it so that when they log out the entire session is no destroyed, just the user info ?
Re: session colours
hmm i dont know the above where that dude (sorry cant see name proper whilst typing..) said store it so when they log in it shows i might do that but at the minute im faced with this..jacek wrote:You could have it so that when they log out the entire session is no destroyed, just the user info ?
i have
<?php if(empty($_SESSION['stylesheet'])) { $_SESSION['stylesheet']="styles/default/stylesheet.css"; echo "<link href='".$_SESSION['stylesheet']."' rel='stylesheet' type='text/css' />"; } else { echo ""; } ?>BUT because the session isn't empty when they refresh homepage it echo's nothing so therefore no stylesheet?
I would put a signature.. BUT, i don't have the time.
Re: session colours
You wanna switch your code around, echo the stylesheet in the else statement. They way you have it now you will echo the stylesheet IF the session is empty
Re: session colours
ahh no its because im setting the session there where i need it to stay empty.. ahh 2minsEcazS wrote:You wanna switch your code around, echo the stylesheet in the else statement. They way you have it now you will echo the stylesheet IF the session is empty
I would put a signature.. BUT, i don't have the time.