0

How to go to referer page using php...

I used $_SERVER['HTTP_REFERER'] to go back but I cant go to last second page where I was before.

It only stores the last page, not the second last one. I dont want to use javascript.

Rohan Kumar
  • 40,431
  • 11
  • 76
  • 106

2 Answers2

1

Keep track of all pages the user visited and use it as a stack to determine the previous page.

That's your only option. Don't go there.

The answer: you can't.

Tom van der Woerdt
  • 29,532
  • 7
  • 72
  • 105
0

i don't know why you used $_SERVER['HTTP_REFERER'] to go back.
you will do this with javascript too :

window.history.go(-1)

where -1 is to go one page back.

jogesh_pi
  • 9,762
  • 4
  • 37
  • 65