redirecting

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pradeepjain
    Contributor
    • Jul 2007
    • 563

    redirecting

    hii guys,
    i am redirecting my website to an error page when it cannot connect to mysql database .because of this the url of the page gets changed to error page url .so the user will try to refresh the page but he still will be in the error page..I need to redirect such that when an error occurs the url must not change but the redirecting must happen .so that when a user refreshes the page when an error occurs .he will be able to connect back.



    thanks,
    pradeep
  • code green
    Recognized Expert Top Contributor
    • Mar 2007
    • 1726

    #2
    If you redirect to another page then the URL is bound to be different.
    You are probably better with a 'Try Again' button in a form
    that submits from the redirected page to the connection page

    Comment

    • pbmods
      Recognized Expert Expert
      • Apr 2007
      • 5821

      #3
      Heya, Pradeep.

      If you use output buffering, you can simply flush the buffer, then use include() to execute the error script.

      Comment

      • pradeepjain
        Contributor
        • Jul 2007
        • 563

        #4
        i found the solution..I redirect to a page on error and then with in the page i use meta refresh and then redirect to main page again...


        thanks,
        pradeep

        Comment

        Working...