dongpa5277 2009-01-03 18:04
浏览 48

如何将值从外部页面传递到框架内?

I have a files inside a page , this page named (mainframe.php) is a frameset contain two subframes files (file 1 : topframe.php , file 2 bottom frame.php) and i need to pass a value from an external page(file:extarnalpage.php) to inside the frmams(topframe and bottomframe). but I can not do that...and the pages is as the followin:

  • mainframe.php

..............................................

  • topframe.php

topframe topframe content

?>

.......................................................

  • bottomframe.php

bottomframe bottomframe content

..................................................

  • externalpage.php

bottomframe bottomframe content

........................................................

my qus is how to get the value of the text from the externalpage.php to topframe.php and bottomframe.php . thanks

  • 写回答

1条回答 默认 最新

  • doudi8231 2009-01-04 10:54
    关注

    What come in mind is sessions.

    Sessions are stored on server and it goes something like this:

    to set variables in session:

    <?php
    session_start();
    
    $_SESSION['some_variable_name_1']='some_variable_value_1';
    $_SESSION['some_variable_name_2']='some_variable_value_2';
    ...
    $_SESSION['some_variable_name_n']='some_variable_value_n';
    ?>
    

    to retrieve variables from session on other page:

    <?php
    session_start();
    
    $some_variable_value_1 = $_SESSION['some_variable_name_1'];
    $some_variable_value_2 = $_SESSION['some_variable_name_2'];
    ...
    $some_variable_value_n = $_SESSION['some_variable_name_n'];
    ?>
    

    more on sessions at http://www.php.net/session

    But I would really encourage you to leave frames and tables and use css for element positioning - it is so much easier and you get more readable html.

    评论

报告相同问题?

悬赏问题

  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 关于大棚监测的pcb板设计
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题