Detail - Master Page back Link

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
royalblue
Forum Newbie
Posts: 13
Joined: Sun May 16, 2004 8:26 am

Detail - Master Page back Link

Post by royalblue »

I am using dreamweaver mx 2004, PHP & Mysql (plus IE V6 Browser)

I want to create a link back to a Database results page from a detail page. The results page was originally created from a submit form on a 'search the database' page'. Somebody gave me the following javascript to use:

<a href="javascript:history.go(-1);">Back to Previous Page</a>

This however gives me the follwoing warning message in the browser window when I try to link back:
'Warning: Page has Expired
The page you requested was created using information you submitted in a form. This page is no longer available. As a security precaution, Internet Explorer does not automatically resubmit your information for you.

To resubmit your information and view this Web page, click the Refresh button. '

when I click on view >refresh it asks me to 'retry' submitting the form. I then get taken back to the results page correctly.

Is there any way of coding the 'back' link so I don't get the warning message?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

sounds like a job for sessions, da-daDA! :P

check the following link for PHPDN's on-site tutorial about sessions. There are several hundred threads about them hanging around as well. :)
viewtopic.php?t=6521
royalblue
Forum Newbie
Posts: 13
Joined: Sun May 16, 2004 8:26 am

Post by royalblue »

Does anybody know the specific Code that I need to do the back link ? Do I have to amend the Javascript somehow?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

depending on how your results page gets the variables (post or get) you can pass the search string to the detail page. This can either be done with sessions or the url.
royalblue
Forum Newbie
Posts: 13
Joined: Sun May 16, 2004 8:26 am

Post by royalblue »

Are you suggesting using a URL Parameter to pass the variable back to the original results page? I thought of this originally but it makes the results page rather messy and there are all sorts of problems with the filtering etc. Remember I'm trying to get back to a results page from a detail page. Can anybody provide any specific code for this ? Please be gntl (& explanatory !) ith your answers as Im a newbie :)
Post Reply