Sessie controle

Gestart doorDylan3 reacties52 weergaven

4 berichten · pagina 1 van 1

Dylan

Lid · Topicstarter

Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
hoe controleer je of er nog een sessie bestaat?

want ik heb nu als je inlogt, en je cache leegt kan je nog wel in dingen komen die eigenlijk alleen voor de ingelogd gebruiker is.
0
Berichten
1.579
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]Sessionname[/COLOR][COLOR= #007700]])){[/COLOR]
[COLOR= #FF8000]// Sessionsbestaat[/COLOR]
[COLOR= #007700]}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
[COLOR= #FF8000]// Sessionbestaatniet[/COLOR]
[COLOR= #007700]}[/COLOR]


?>


Let niet op de uitlijning hoor ... clown
0
Dylan

Lid · Topicstarter

Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
Thanks

toevoeging op 26 juni 2012, 15:06:04:
Ik heb nu dit
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]])) {[/COLOR]
[URL="http://www.php.net/header"]header[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"Location: index.php"[/COLOR][COLOR= #007700]); 
}[/COLOR]
?>


en die include ik op elke pagina behalve de index en registeren

toevoeging op 26 juni 2012, 15:06:35:
en het werkt prima xd
0
Berichten
1.579
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Dylanh schreef:
Thanks
toevoeging op 26 juni 2012, 15:06:04:
Ik heb nu dit
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_SESSION[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]])) {[/COLOR]
[URL="http://www.php.net/header"]header[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"Location: index.php"[/COLOR][COLOR= #007700]); 
}[/COLOR]
?>


en die include ik op elke pagina behalve de index en registeren

toevoeging op 26 juni 2012, 15:06:35:
en het werkt prima xd
Hoezo index.php hij word toch altijd al naar index gelinkt?
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren