Welcome Guest, Not a member yet? Register   Sign In
redirect doesn't work
#18

[eluser]coolgeek[/eluser]
[quote author="max123" date="1265985096"]Hi maria,
I found the reason. There are 2 echo statements inside a function above to the function that has redirect. I removed those echo statements. Now redirect works finely. Now the problem is how can I use those echo statements in the upper function. Do u have any idea?[/quote]

You can't redirect after you've already echoed something. HTTP headers were already sent in order to execute the echo statements. The redirect() function sends a redirect header.

You will need to store the statements in a session variable and present them from within the page you redirect to.


Messages In This Thread
redirect doesn't work - by El Forum - 02-11-2010, 11:58 PM
redirect doesn't work - by El Forum - 02-12-2010, 12:02 AM
redirect doesn't work - by El Forum - 02-12-2010, 12:14 AM
redirect doesn't work - by El Forum - 02-12-2010, 12:17 AM
redirect doesn't work - by El Forum - 02-12-2010, 12:20 AM
redirect doesn't work - by El Forum - 02-12-2010, 12:23 AM
redirect doesn't work - by El Forum - 02-12-2010, 12:23 AM
redirect doesn't work - by El Forum - 02-12-2010, 12:26 AM
redirect doesn't work - by El Forum - 02-12-2010, 12:29 AM
redirect doesn't work - by El Forum - 02-12-2010, 12:37 AM
redirect doesn't work - by El Forum - 02-12-2010, 12:41 AM
redirect doesn't work - by El Forum - 02-12-2010, 12:58 AM
redirect doesn't work - by El Forum - 02-12-2010, 01:03 AM
redirect doesn't work - by El Forum - 02-12-2010, 01:18 AM
redirect doesn't work - by El Forum - 02-12-2010, 02:06 AM
redirect doesn't work - by El Forum - 02-12-2010, 02:31 AM
redirect doesn't work - by El Forum - 02-12-2010, 04:01 AM
redirect doesn't work - by El Forum - 02-13-2010, 01:50 PM



Theme © iAndrew 2016 - Forum software by © MyBB