473,326 Members | 2,680 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

I want the page to go back to my login page.

I want to logoff my application and I have set up a link to do this. I
got it to destroy my session, but I can't get the page to go to the top
of the browser and do a page refresh. Here is the code I am using.

First there is the link I am using.

printf("<a href=\"%s?logoff=%s\">%s</a><br>\n",
$_SERVER['PHP_SELF'],"logoff", "LOGOFF");

Here is piece I use right at the top of the script to destroy the
session and try to refresh the page.

if (isset($_REQUEST['logoff'])){
session_destroy();
$_SERVER['PHP_SELF'];
}

What do I have to do to get the refresh to work?

May 17 '06 #1
2 1468
Rik
rich wrote:
I want to logoff my application and I have set up a link to do this. I
got it to destroy my session, but I can't get the page to go to the
top of the browser and do a page refresh. Here is the code I am using.

First there is the link I am using.

printf("<a href=\"%s?logoff=%s\">%s</a><br>\n",
$_SERVER['PHP_SELF'],"logoff", "LOGOFF");

Here is piece I use right at the top of the script to destroy the
session and try to refresh the page.

if (isset($_REQUEST['logoff'])){
session_destroy();
$_SERVER['PHP_SELF'];
}

What do I have to do to get the refresh to work?


A bit blunt:
if (isset($_REQUEST['logoff'])){
session_destroy();
header("Location: http://somewhere.dk");
}

Grtz,
--
Rik Wasmus
May 17 '06 #2
Again Rick you are on the money.

May 18 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: John | last post by:
Could anyone please help me on this?? I have a php script page, which is basically quiz. Visitors (after login in with their email address) are supposed to answer each question, and when they...
4
by: TG | last post by:
Hi, I have a question concerning redirecting users who have logged in using our login page. Once they have properly filled out the form they should be redirected back to the last page they were...
1
by: Tom Jones | last post by:
Hi, I am using the HttpWebRequest and HttpWebResponse classes to pull information from a web server on the internet. I have an account on one of the webservers that I need to log into...
6
by: John Lau | last post by:
Hi, I am looking at the MS KB Article 306355: HOW TO: Create Custom Error Reporting Pages in ASP.NET by Using Visual C# .NET This article describes how to redirect errors to a custom html...
4
by: Brian Lowe | last post by:
I'm using Forms authentication with my user data in a SQL db. I have pages in the main appliaction folder accessible to anonymous users and I've set security to deny annonymous users access to...
7
by: Tom wilson | last post by:
I have created a very simple example that doesn't work. Form1 contains a textbox and a button: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles...
8
by: Edward Mitchell | last post by:
I have a main project that is protected in that the user is directed to a login.aspx file. The text in the web.config file is: <authentication mode="Forms"> <forms loginUrl="Login.aspx" />...
6
by: BizWorld | last post by:
Hi, I have a scenario where i need to configure only Login.aspx page to use SSL. All other application will run on HTTP protocol. If someone can guide me how to accomplish this. One of my idea...
1
by: vunet.us | last post by:
Imagine: user clicks the link which brings him/her to a secure page (let's call it page "X") which requires login session. If user is not logged in, he/she is redirected to a login page. Question:...
1
by: simon2x1 | last post by:
i have two page the login page(login.php) and the userpanel page(userpanel.php) in the login page whenever i put in the username and password then i click submit it will get the userpanel page but...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.