forumnz Posted December 30, 2006 Share Posted December 30, 2006 Stop someone from accessing a few pages without being logged in? Link to comment https://forums.phpfreaks.com/topic/32255-how-can-i-use-cookies-or-something-in-php-to/ Share on other sites More sharing options...
fert Posted December 30, 2006 Share Posted December 30, 2006 using cookies[code]if($_COOKIE['user']==""){ die("You need to be logged in to do that");}[/code]using sessions[code]if($_SESSION['user']==""){ die("You need to be logged in to do that");}[/code] Link to comment https://forums.phpfreaks.com/topic/32255-how-can-i-use-cookies-or-something-in-php-to/#findComment-149704 Share on other sites More sharing options...
ki Posted December 30, 2006 Share Posted December 30, 2006 you could also use both accessing a cookie and then turning it into a session Link to comment https://forums.phpfreaks.com/topic/32255-how-can-i-use-cookies-or-something-in-php-to/#findComment-149711 Share on other sites More sharing options...
forumnz Posted December 30, 2006 Author Share Posted December 30, 2006 Could anyone please point me to a tutorial?Thanks all! Link to comment https://forums.phpfreaks.com/topic/32255-how-can-i-use-cookies-or-something-in-php-to/#findComment-149712 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.