Jump to content

[SOLVED] password and sessions


dahwan

Recommended Posts

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.php
i 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.php
get what i mean?
my only problem is; i dont know anything about sessions!

can you help me? thanks!

dahwan
Link to comment
Share on other sites

2 bad i am a noob and needs help to do everything :P
how 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
Share on other sites

it is possible. just make the cookie expire when he closes the browser

first 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 cookie

http://au2.php.net/manual/en/function.http-parse-cookie.php
Link to comment
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.