Hi to set and destroy Session

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
umapathy
Forum Newbie
Posts: 14
Joined: Fri Jul 28, 2006 2:21 am
Location: chennai - india

Hi to set and destroy Session

Post by umapathy »

Dear All,

how to set and Destroy session,
Please explain me some good example (login page and logout page).
with out sessioon i should view aparticular page


auamapathy
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

The session info in the PHP manual explains setting and destroying session variables quite well. http://uk2.php.net/session .. look at the comments especially.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

umapathy, you've duplicated a total of four threads. STOP or we will throw you off the board.
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:3. Do not make multiple, identical posts. This is viewed as spam and will be deleted.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

This is the last warning. Use your existing thread if it's the same topic.
umapathy wrote:Dear All,

i want to ceate a login page. if the user ans password is correct . it should got main page.(i check user id and pass from mysql).and i want to logging out.
if i directly type mainpage in url. it should not got to that page ,control directely come to login page.
how can i achive this process using session.
if any one known this post fullcode like, login page.php,mainpage.php,logout.php

Thanks and Regards
Umapathy
Post Reply