Zubrag.com
May 20, 2012, 10:56:22 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Logout plus Redirect  (Read 2373 times)
lewis712
Newbie
*
Posts: 2


« on: June 12, 2007, 08:18:58 am »

Hello,

I added the following link to my password protected pages for users to logout:

<a href="my_URL/protector/password_protect.php?logout">Logout</a>

How do I make it so that when they click the Logout button that it redirects back to the homepage instead of just a blank page that says "logged out"?

Thanks,
Andy

Logged
zubrag
Administrator
Hero Member
*****
Posts: 753


WWW
« Reply #1 on: June 12, 2007, 10:17:31 am »

Replace following string in password_protect.php

die("Logged out.");

with

header('Location: http://www.example.com/myhomepage.php');
exit();
Logged
lewis712
Newbie
*
Posts: 2


« Reply #2 on: June 12, 2007, 12:34:37 pm »

This is exactly what I needed.  Thanks for all your help....I really love this script.

Andy
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC