By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,563 Members | 1,058 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,563 IT Pros & Developers. It's quick & easy.

redirecting

pradeepjain
100+
P: 563
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
Sep 18 '08 #1
Share this Question
Share on Google+
3 Replies


code green
Expert 100+
P: 1,726
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
Sep 18 '08 #2

pbmods
Expert 5K+
P: 5,821
Heya, Pradeep.

If you use output buffering, you can simply flush the buffer, then use include() to execute the error script.
Sep 18 '08 #3

pradeepjain
100+
P: 563
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
Sep 19 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.