douyue4334 2014-03-17 09:30
浏览 106

只需点击一下即可刷新两个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. :)

  • 写回答

1条回答 默认 最新

  • douhezhan5348 2014-03-17 09:43
    关注

    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; ?>
    
    评论

报告相同问题?

悬赏问题

  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法
  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图