dahwan Posted December 25, 2006 Share Posted December 25, 2006 hey again... [url=http://www.dahwan.com]www.dahwan.com[/url]i am trying to make all the pages in my directory unavaliable exept index.phpi am trying to use sessions to remember if the person wrote the right password in index.php, and if he did, he gains acces to all the pages in the directory like gallery.php and news.phpget what i mean?my only problem is; i dont know anything about sessions!can you help me? thanks!dahwan Link to comment https://forums.phpfreaks.com/topic/31837-solved-password-and-sessions/ Share on other sites More sharing options...
Shu Posted December 25, 2006 Share Posted December 25, 2006 make the user store a cookiepass=INSERT PASSWORD HEREno sessions needed since there's no accounts anyway Link to comment https://forums.phpfreaks.com/topic/31837-solved-password-and-sessions/#findComment-147667 Share on other sites More sharing options...
dahwan Posted December 25, 2006 Author Share Posted December 25, 2006 2 bad i am a noob and needs help to do everything :Phow do i store a cookie?and i want the user to write the pass, and gain acces to my page. when he closes the browser and re-opens it he must write the password again.is that possible? Link to comment https://forums.phpfreaks.com/topic/31837-solved-password-and-sessions/#findComment-147668 Share on other sites More sharing options...
dahwan Posted December 26, 2006 Author Share Posted December 26, 2006 please help Link to comment https://forums.phpfreaks.com/topic/31837-solved-password-and-sessions/#findComment-147752 Share on other sites More sharing options...
Shu Posted December 26, 2006 Share Posted December 26, 2006 it is possible. just make the cookie expire when he closes the browserfirst when he enters the password, i'd use javascript to make him store the cookie.then when he request '/gallery.php', use php to check if he has the correct cookiehttp://au2.php.net/manual/en/function.http-parse-cookie.php Link to comment https://forums.phpfreaks.com/topic/31837-solved-password-and-sessions/#findComment-147816 Share on other sites More sharing options...
dahwan Posted December 26, 2006 Author Share Posted December 26, 2006 THANK you! thats the kind of reply i love. why am i suddenly called NonSpammer..? Link to comment https://forums.phpfreaks.com/topic/31837-solved-password-and-sessions/#findComment-148021 Share on other sites More sharing options...
marcus Posted December 26, 2006 Share Posted December 26, 2006 You reached a certain post amount. Link to comment https://forums.phpfreaks.com/topic/31837-solved-password-and-sessions/#findComment-148022 Share on other sites More sharing options...
dahwan Posted December 26, 2006 Author Share Posted December 26, 2006 cool! so there are grades here? :) Link to comment https://forums.phpfreaks.com/topic/31837-solved-password-and-sessions/#findComment-148083 Share on other sites More sharing options...
conker87 Posted December 27, 2006 Share Posted December 27, 2006 Not really. Just like most other forums the more you post, the more respectable and trusted you'll become.Obviously, if you just spam crap then you'll be banned and not become that respectable and trusted employee of the month that you've always dreamed of... sigh.Ahem, sorry, daydreaming... Link to comment https://forums.phpfreaks.com/topic/31837-solved-password-and-sessions/#findComment-148116 Share on other sites More sharing options...
dahwan Posted December 27, 2006 Author Share Posted December 27, 2006 thats ok. thx. Link to comment https://forums.phpfreaks.com/topic/31837-solved-password-and-sessions/#findComment-148174 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.