Jump to content

[SOLVED] History Header


Hagbard

Recommended Posts

is there any way in the header file to have the page go back two pages

 

header ("location: index.php");  - will take you back to index and I know if I make an input button it can go back a page

 

<input type=button value=\"Go Back to List\" onClick=\"history.go(-1)\"> | ";

 

but is there any way to combine the two so that it will automatically go back a page?

Link to comment
Share on other sites

Yes the code will be put into a process page but I want it to go back to the page before the page that started the process.

 

Now give me a second to reread my reply and make sure I said that right. lol

 

But yes I need to go back 2 pages.

 

Link to comment
Share on other sites

I do have a sessions script already running. However if that came to it I could just create a separate process page for each and point it to the page I'm looking for.

 

I have

 

post 1

post 2

post 3

post 4

 

I could just create a process page for each one that points to its respected page.

Link to comment
Share on other sites

<body onload="javascript: history.go(-2)">

 

That'll send them back two pages in their history, which might not be too reliable (they may have visited other pages in between)...You should store the page before the page in a session variable and redirect them like that.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.