nimzie Posted October 29, 2007 Share Posted October 29, 2007 I have a page which is all PHP processing. It outputs errors via echo. Since I am using echos for errors, I can not use header("location:http://wwhatever.com") after the code to redirect to the HTML page depending on the success of my operation. The user arrives at this page after clicking a submit button. Form action gets me to the page. The page is all PHP right now. What is a good way to get around this? I do need the echos in case there are errors - also to keep the user apprised of what is happening in the processing. Any advice? Thanks, Adam Quote Link to comment https://forums.phpfreaks.com/topic/75218-php-redirect-question/ Share on other sites More sharing options...
trq Posted October 29, 2007 Share Posted October 29, 2007 There is no point echoing anything prior to a redirect as it will not be shown. You need to adjust your logic accordingly. Quote Link to comment https://forums.phpfreaks.com/topic/75218-php-redirect-question/#findComment-380428 Share on other sites More sharing options...
ThYGrEaTCoDeR201 Posted October 29, 2007 Share Posted October 29, 2007 header("refresh: 5; url=www.phpfreaks.com"); In this example, the page will be redirected in 5 seconds..This way the user can see the echo's of the errors before being redirected. Quote Link to comment https://forums.phpfreaks.com/topic/75218-php-redirect-question/#findComment-380478 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.