remove echos before redirecting

I know it's just an example, but the echos cause a header already sent error