How to disable brouser back.

Reply

Join Date: Feb 2007
Posts: 52
Reputation: ajay_tabbu is an unknown quantity at this point 
Solved Threads: 0
ajay_tabbu's Avatar
ajay_tabbu ajay_tabbu is offline Offline
Junior Poster in Training

How to disable brouser back.

 
0
  #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.
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 16,134
Reputation: jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all 
Solved Threads: 529
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Moderator

Re: How to disable brouser back.

 
0
  #2
Oct 1st, 2007
you could use javascript to disable back i think but its not secure as they can just disable java.
If i am helpful, please give me reputation points.
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 52
Reputation: ajay_tabbu is an unknown quantity at this point 
Solved Threads: 0
ajay_tabbu's Avatar
ajay_tabbu ajay_tabbu is offline Offline
Junior Poster in Training

Re: How to disable brouser back.

 
0
  #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 Quick reply to this message  
Join Date: Feb 2007
Posts: 52
Reputation: ajay_tabbu is an unknown quantity at this point 
Solved Threads: 0
ajay_tabbu's Avatar
ajay_tabbu ajay_tabbu is offline Offline
Junior Poster in Training

Re: How to disable brouser back.

 
0
  #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 Quick reply to this message  
Join Date: Jun 2007
Posts: 1,227
Reputation: kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about 
Solved Threads: 167
kkeith29's Avatar
kkeith29 kkeith29 is offline Offline
Nearly a Posting Virtuoso

Re: How to disable brouser back.

 
0
  #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 Quick reply to this message  
Join Date: Sep 2007
Posts: 3
Reputation: nishit_soni is an unknown quantity at this point 
Solved Threads: 0
nishit_soni nishit_soni is offline Offline
Newbie Poster

Re: How to disable brouser back.

 
0
  #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 Quick reply to this message  
Join Date: Feb 2007
Posts: 52
Reputation: ajay_tabbu is an unknown quantity at this point 
Solved Threads: 0
ajay_tabbu's Avatar
ajay_tabbu ajay_tabbu is offline Offline
Junior Poster in Training

Re: How to disable brouser back.

 
0
  #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.
  1. <span class="ad_notxt"><code class="inlinecode">
  2. <Script>
  3. window.history.forward(1);
  4. </Script>
  5. </code></span>

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 Quick reply to this message  
Join Date: Feb 2007
Posts: 52
Reputation: ajay_tabbu is an unknown quantity at this point 
Solved Threads: 0
ajay_tabbu's Avatar
ajay_tabbu ajay_tabbu is offline Offline
Junior Poster in Training

Re: How to disable brouser back.

 
0
  #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 Quick reply to this message  
Join Date: Jun 2007
Posts: 1,227
Reputation: kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about 
Solved Threads: 167
kkeith29's Avatar
kkeith29 kkeith29 is offline Offline
Nearly a Posting Virtuoso

Re: How to disable brouser back.

 
0
  #9
Oct 3rd, 2007
try this.

Login page -

  1. <?php
  2. if (isset($_SESSION['username']) && isset($_SESSION['password'])) {
  3. session_destroy();
  4. }
  5. else {
  6. //Put login script here
  7. }
  8. ?>
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 52
Reputation: ajay_tabbu is an unknown quantity at this point 
Solved Threads: 0
ajay_tabbu's Avatar
ajay_tabbu ajay_tabbu is offline Offline
Junior Poster in Training

Re: How to disable brouser back.

 
0
  #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 -

  1. <?php
  2. if (isset($_SESSION['username']) && isset($_SESSION['password'])) {
  3. session_destroy();
  4. }
  5. else {
  6. //Put login script here
  7. }
  8. ?>
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 Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC