只需点击一下即可刷新两个iframe

I have two iframes named "header" and "content". When the index page is loaded, the "header" contains a link to the Home Page, and another link to the Login Page. While the "context" displays stuff about the page and all that.


Now the problem is, after I log in, I want both of the frames to reload. I can change "context" because this is the iframe where I will do the logging in so there's no problem.


What I am tyring to do now is to find out how I could also change the "header" iframe. After logging in, I want it to display a link for Home Page for his tasks, and a link that would display the username of the logged in user for his profile.

Is there any way I could do this? I am using PHP, by the way.
Thank you in advance. :)

it would be better if you share your codes with us, its hard to answer by this way, you can try using php sessions for check a user logged in or not. after the code which you checking login, if login is success create the session and define $_SESSION['userName'] or userID as you wish and you check if session userName set on your header or content.

<?php if($_SESSION['userName']): ?>
  // your html codes goes here for logged in user
<?php else: ?>
 // your html codes goes here for non-user
<?php endif; ?>