•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 456,516 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,817 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 2239 | Replies: 13
![]() |
I want help.
what i do:I creat three pages 1. login.php, 2. welcome.php, 3.change password.php.
when we login(right Id & P/W) welcome.php will open,On that page i have put two option
i. Logout, ii.change password.,on clicking on Logout we will logout to enter again we have to enter password.As session is distroyed.
Problem: On welcome.php page when I logout then sesstion is dertroyed so we can not go back. welcome page when I click on back button(on brosure) it come on login page and on click on forward botton it come on welcome page.But i want ones it come on login page without without entering Id & password it should not come on welcome page as in logout condition.
what i do:I creat three pages 1. login.php, 2. welcome.php, 3.change password.php.
when we login(right Id & P/W) welcome.php will open,On that page i have put two option
i. Logout, ii.change password.,on clicking on Logout we will logout to enter again we have to enter password.As session is distroyed.
Problem: On welcome.php page when I logout then sesstion is dertroyed so we can not go back. welcome page when I click on back button(on brosure) it come on login page and on click on forward botton it come on welcome page.But i want ones it come on login page without without entering Id & password it should not come on welcome page as in logout condition.
i m oblised for all member of daniweb.as helping me every time.this is best site for those who want to learn themself.
•
•
Join Date: Apr 2005
Location: Dundee, Scotland
Posts: 12,883
Reputation:
Rep Power: 32
Solved Threads: 305
•
•
Join Date: Jun 2007
Location: Valley Center, Kansas
Posts: 643
Reputation:
Rep Power: 3
Solved Threads: 72
•
•
Join Date: Sep 2007
Location: Ahmedabad, India
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
Hi Ajay Babu
According to me, you should just use session with proper understanding, I think your code write properly. Just make sure the use of session...
Thanks
Nishit Soni
nishit_0627@yahoo.co.in
According to me, you should just use session with proper understanding, I think your code write properly. Just make sure the use of session...
Thanks
Nishit Soni
nishit_0627@yahoo.co.in
yes kkeith29,what you understand that is right.and I have got the solution for that there is javascript which slove my problem that scripte is.
but still i m looking for batter solution
now I want something like yahoomail,on which after login ones if we come on login page(without doing logout) then we have to login again.
<Script>
window.history.forward(1);
</Script>
but still i m looking for batter solution
now I want something like yahoomail,on which after login ones if we come on login page(without doing logout) then we have to login again.
i m oblised for all member of daniweb.as helping me every time.this is best site for those who want to learn themself.
Soniji thanks for suggestion.
I read basic of session and I m using that,as I do logout session get distroyed.but I don't know how to distroy session when user come on privious page(i.t. loginpage) so if u have some idea about that then plz help me.
I read basic of session and I m using that,as I do logout session get distroyed.but I don't know how to distroy session when user come on privious page(i.t. loginpage) so if u have some idea about that then plz help me.
i m oblised for all member of daniweb.as helping me every time.this is best site for those who want to learn themself.
•
•
Join Date: Jun 2007
Location: Valley Center, Kansas
Posts: 643
Reputation:
Rep Power: 3
Solved Threads: 72
try this.
Login page -
Login page -
<?php
if (isset($_SESSION['username']) && isset($_SESSION['password'])) {
session_destroy();
}
else {
//Put login script here
}
?> thanks kkeith
I try this code but still problem is not slove,Do u have any other idea then plz suggest me.plz Tell that how can we handal event by windows object in php.
I try this code but still problem is not slove,Do u have any other idea then plz suggest me.plz Tell that how can we handal event by windows object in php.
•
•
•
•
try this.
Login page -
<?php if (isset($_SESSION['username']) && isset($_SESSION['password'])) { session_destroy(); } else { //Put login script here } ?>
i m oblised for all member of daniweb.as helping me every time.this is best site for those who want to learn themself.
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- SMART Command (Motherboards, CPUs and RAM)
- How to disable Back button of IE when executing welcome.aspx page? (ASP.NET)
- How to set landscape orientation? (JavaScript / DHTML / AJAX)
- does <img tag has disable property (HTML and CSS)
Other Threads in the PHP Forum
- Previous Thread: how can i redirect like asp
- Next Thread: Getting mysql "UNaffected" rows



Linear Mode