LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 05-11-2004, 04:25 PM   #1
Gerardoj
Member
 
Registered: May 2003
Location: Somewhere over the Rainbow
Distribution: Slackware 9.x, Knoppix, Damn Small Linux, RedHat.
Posts: 465

Rep: Reputation: 30
PHP header("Location")


Hi I would like to know how can I redirect to the last page that I was looking?

I can do
PHP Code:
header("location:index.php"
But whit the above code always redirect me to index.php

I would like to redirect to the last page that I saw..

Thanks a lot..
 
Old 05-11-2004, 04:29 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
You could try using "$_SERVER['HTTP_REFERER'];" but not all browsers will send this so you may want to include the name of a page itself in the querystring - ie, in links.php:
<A href="script.php?referer=links.php">Run Script</A>

Then you can use the $_GET["referer"] variable to get the last page name.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Cannot find header source files" when trying to install Nvidia 6111 drivers naddad Linux - Newbie 3 08-31-2004 12:42 PM
Fedora first update hangs on "Fetching rpm header: glibc-2.3.2-101.4" Darthomir Fedora 24 04-10-2004 11:53 AM
How do I get "Kernel Header" files so I can install nVidia drivers Stevetgn Linux - Newbie 4 01-14-2004 05:57 PM
"ifnet structure (regarding configured interfaces)header file in linux9?" deepender Programming 0 12-07-2003 12:11 AM
php ide with "break" and "trace" Kayaker Programming 3 04-25-2003 02:52 PM


All times are GMT -5. The time now is 11:41 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration