That doesn't actually fix your problem, and because you didn't read the topic you likely haven't learned how to solve the problem in the future. You were printing content to the browser before trying to redirect, you can't do that in PHP. You asked "how can I sent the visitor allready login to a different page without giving the welcome and the two links, just to a different page" Well, that's not what you're doing, now you're showing them the links and then redirecting them. If you want to do it like you asked, you have to restructure your code. Reading the topic I suggested would have helped.