Rohan Kumar
Rohan Kumar

Reputation: 40639

How to go referer page using php

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.

Upvotes: 0

Views: 529

Answers (2)

jogesh_pi
jogesh_pi

Reputation: 9782

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.

Upvotes: 0

Tom van der Woerdt
Tom van der Woerdt

Reputation: 29965

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.

Upvotes: 1

Related Questions