Current location: Hot Scripts Forums » General Web Coding » JavaScript » on_back_click_jump_to_login_site:javascript


on_back_click_jump_to_login_site:javascript

Reply
  #1 (permalink)  
Old 01-13-04, 12:10 PM
<?Wille?> <?Wille?> is offline
Junior Code Guru
 
Join Date: Jan 2004
Location: Helsinki, Finland
Posts: 666
Thanks: 0
Thanked 0 Times in 0 Posts
on_back_click_jump_to_login_site:javascript

im working with sites 4 a driving school.. i have a database with usertable and another table where the schools owner can add the date 4 next class. everything is working exept the logout. on restricted area there is a link 4 logout witch sends the user 2 logout.php.. it actualy just sends the user to next page. if useing IE user cant back to restricted sites becourse the code sends him/her back but in opera there is nothing stopping that.. so i need some code (javascript or php) that works in opera, netscape, and IE and sends the user to the login form when they try to back to pass.prot sites

thanks 4 all help

Wille
Reply With Quote
  #2 (permalink)  
Old 01-17-04, 02:06 PM
delerium's Avatar
delerium delerium is offline
Newbie Coder
 
Join Date: Jan 2004
Location: pittsburgh
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
here you go

this is really a php question but:

what you should do is have the page redirected to another page, called logout, for example. this page would look like:
<?
session_start();

if(!isset($_REQUEST['logmeout'])){
session_unset();
session_destroy();
if(!session_is_registered('first_name')){
echo "<center><font color=red><strong>You are now logged out!</strong></font></center><br />";

include 'login_form.html';
}
}
?>

you will have to change some variables but this will work.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT -5. The time now is 11:45 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.