1. No Profile Picture
    Contributing User
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    May 2003
    Brisbane, Australia
    Rep Power

    Question Passing a request to another page and displaying the new pages URL

    I've got a number of pages on my site that communicate with a database. Everything is working well but I am now trying protect myself from Stupid User Errors.

    Specifically when a user performs a database operation and then hits the refresh button repeatedly on the page that did the operation. (SQL Inserts are particularly ugly in this situation)

    My problem is that both the data handling and the resulting page rely on information in the request object from the original form.

    I've tried processing the information on one page and then sending a redirect but this loses the request object. I've also tried using the forward method but it only displays the result page, it doesn't actually send the user there so refreshes will still mess me up.

    What I really want is to do all my SQL operations on one page and then send them to a results page that can be refreshed as many times as they like without corrupting my database.

    Any ideas?
  2. #2
  3. No Profile Picture
    Clueless llama
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Feb 2001
    Lincoln, NE. USA
    Rep Power
    The only way to change the url in the clients address bar is to send a redirect. If you need some info that is lost, you may want to see if you can put it into the session instead.

IMN logo majestic logo threadwatch logo seochat tools logo