Page 1 of 1

2 Problems

Posted: Sun Mar 21, 2004 12:38 pm
by mjseaden
Dear All,

I am having two problems with my new site.

(1) I have a search page. The search page is accessed from the front page of my site, on which a form is placed where users are able to select their search criteria. The search form finds items in the database that fulfill this criteria, and displays them.

Because a small thumbnail is shown for each item, it takes some time for the whole search page to load. If a user clicks on one of the matching thumbnail before the page is fully loaded, a new page showing detailed information on that item is shown.

Now, when the user clicks 'Back' to go back to the search listing, because the searching listing wasn't fully loaded before the user clicked on an item, IE for some reason says that the 'Web Page Has Expired'.

If the search page is fully loaded before the user clicks on an item thumbnail, this problem does not occur.

Is there any solution to this problem?

(2) I have an 'item add' form to fill in so that administrators can add new items to the database. On this page are various text boxes/areas to fill in containing information on these items, and some FILE input controls so that the adminsitrator can select photos of the item off a hard drive to upload to the site.

When the administrator wants to upload the photos, I need to take them to a new page whilst the photos are uploaded, posting the data using the POST method. When I direct the administrator back to the 'item add' form, I want the information entered into those text boxes/areas to still be there.

What is the best way to save this information?

Many thanks for your help on either of these points.

Mark

Posted: Sun Mar 21, 2004 1:13 pm
by magicrobotmonkey
To problem one, I have no answer. Problem 2, assuming you are using functions, save the POST data variables to appropriate SESSION data variables when moving away from the input page. Then, on the input page, at each form input check to see if the approrate SESSION variable is set, and, if so, fill it in. Simple!

Posted: Sun Mar 21, 2004 1:37 pm
by patrikG
try header("cache: private"); on the search-page.

Posted: Sun Mar 21, 2004 3:12 pm
by mjseaden
Hi,

I think the problem is the need to resend the POST information when going back to the search page. I'm sure I haven't experienced this problem on other sites.

Is there any way to get over this resending problem?

Many thanks

Mark

And thanks very much for the solution to the second problem.