Jquery and PHP headers

Hi

I have a login page that I would like to use some jquery to style it but if i put it in when the user logs in it use’s PHP header to redirect them to private.php but in the address bar the page still stays on login.php but shows the content of private.php.

how can i force it to change to private.php as this will let the buttons work with out a refresh.

How does it have the content of “private.php” but the page is “login.php”.
Is it an include? Can you provide some code, to be more clear?

If you still have the content of private.php, what’s the problem?
You can still use your buttons that work “with out a refresh”


// Redirect the user to the private members-only page.
            header("Location: private.php");
			
            die("Redirecting to: private.php");
        }

is the code but if i put


<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.css" />
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.js"></script>

in to the page when i click login then login occurs but in the address bar it shows login.php but is showing the content of private.php and any button on the page does not work.

This code does not help. I need the structure - I can see an unclosed bracket there so, is this redirect after the login is done?.
Does private include login?

i’ve pasted my code to pastebin for you

http://pastebin.com/xbu4zkdq

Will it matter than private.php also includes


<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.css" />
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.js"></script>

Does it make a difference if you move the script tags to the bottom of the page where they belong?