header(‘Location: not REDIRECT but RELOAD body to body of target file

I want to redirect page (index.php) to new url (user.php) after logging in.

after I verify users data from my form I want to redirect user to new file called user.php

and I use for that:

         header("Location: user.php");

after that page doesn’t redirect but reload body content to content of user.php
so user is still on index.php and user.php doesn’t work properly.

It’s appears only on my new server.

I tested it on koding.io and it was ok.

I tried to use

ob_start();

and

ob_end_flush();

but it does not work

thank you for answers

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s