User Name Password Register
DaniWeb IT Discussion Community
All
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
Reply
Join Date: Feb 2007
Location: india
Posts: 52
Reputation: ajay_tabbu is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
ajay_tabbu's Avatar
ajay_tabbu ajay_tabbu is offline Offline
Junior Poster in Training

Help How to disable brouser back.

  #1  
Oct 1st, 2007
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.
i m oblised for all member of daniweb.as helping me every time.this is best site for those who want to learn themself.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Apr 2005
Location: Dundee, Scotland
Posts: 12,883
Reputation: jbennet is a jewel in the rough jbennet is a jewel in the rough jbennet is a jewel in the rough jbennet is a jewel in the rough 
Rep Power: 32
Solved Threads: 305
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Moderator

Re: How to disable brouser back.

  #2  
Oct 1st, 2007
you could use javascript to disable back i think but its not secure as they can just disable java.
TRY MY SUGGESTIONS AT YOUR OWN RISK

Master of puppets Im pulling your strings, blinded by me, you cant see a thing. Master! Master!
Reply With Quote  
Join Date: Feb 2007
Location: india
Posts: 52
Reputation: ajay_tabbu is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
ajay_tabbu's Avatar
ajay_tabbu ajay_tabbu is offline Offline
Junior Poster in Training

Re: How to disable brouser back.

  #3  
Oct 1st, 2007
I don't know too much about javascript,so plz tell me some script if u know for this.
i m oblised for all member of daniweb.as helping me every time.this is best site for those who want to learn themself.
Reply With Quote  
Join Date: Feb 2007
Location: india
Posts: 52
Reputation: ajay_tabbu is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
ajay_tabbu's Avatar
ajay_tabbu ajay_tabbu is offline Offline
Junior Poster in Training

Re: How to disable brouser back.

  #4  
Oct 1st, 2007
I find one script that is
<Script>window.history.forward(1);</Script>
but it disable back button for all pages.

anyone have batter idia.if any then plz tell 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.
Reply With Quote  
Join Date: Jun 2007
Location: Valley Center, Kansas
Posts: 643
Reputation: kkeith29 is on a distinguished road 
Rep Power: 3
Solved Threads: 72
kkeith29's Avatar
kkeith29 kkeith29 is offline Offline
Practically a Master Poster

Re: How to disable brouser back.

  #5  
Oct 2nd, 2007
i am trying to understand exactly what you mean. so you don't want people to go back to welcome.php after logout. is that what you are saying?
Reply With Quote  
Join Date: Sep 2007
Location: Ahmedabad, India
Posts: 3
Reputation: nishit_soni is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
nishit_soni nishit_soni is offline Offline
Newbie Poster

Re: How to disable brouser back.

  #6  
Oct 2nd, 2007
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
Reply With Quote  
Join Date: Feb 2007
Location: india
Posts: 52
Reputation: ajay_tabbu is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
ajay_tabbu's Avatar
ajay_tabbu ajay_tabbu is offline Offline
Junior Poster in Training

Re: How to disable brouser back.

  #7  
Oct 3rd, 2007
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.

<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.
Reply With Quote  
Join Date: Feb 2007
Location: india
Posts: 52
Reputation: ajay_tabbu is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
ajay_tabbu's Avatar
ajay_tabbu ajay_tabbu is offline Offline
Junior Poster in Training

Re: How to disable brouser back.

  #8  
Oct 3rd, 2007
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 m oblised for all member of daniweb.as helping me every time.this is best site for those who want to learn themself.
Reply With Quote  
Join Date: Jun 2007
Location: Valley Center, Kansas
Posts: 643
Reputation: kkeith29 is on a distinguished road 
Rep Power: 3
Solved Threads: 72
kkeith29's Avatar
kkeith29 kkeith29 is offline Offline
Practically a Master Poster

Re: How to disable brouser back.

  #9  
Oct 3rd, 2007
try this.

Login page -

<?php
if (isset($_SESSION['username']) && isset($_SESSION['password'])) {
session_destroy();
}
else {
   //Put login script here
}
?>
Reply With Quote  
Join Date: Feb 2007
Location: india
Posts: 52
Reputation: ajay_tabbu is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
ajay_tabbu's Avatar
ajay_tabbu ajay_tabbu is offline Offline
Junior Poster in Training

Re: How to disable brouser back.

  #10  
Oct 4th, 2007
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.
Originally Posted by kkeith29 View Post
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.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 4:01 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC