dsrbb20862 2016-04-15 10:57
浏览 34

将值传递给相同的php文件

I have one php block under html for dropdown list which is under loop.Another php block is for popup window using facebox. Now How by clicking dropdown content pass value to second php block.

<?php


         $msql="select notification_id,applicant_id,notification_dis from app_notification where applicant_id=$app_id order by notification_id desc " ;
        $result_msql=$bd->query($msql);
        while($messagecount=$result_msql->fetch_assoc())

        {
        $not_id=    $messagecount['notification_id'];
        $comment=$messagecount['notification_dis'];


        ?>




            <div  class="comment_ui" >



        <a href="#info"  class='view_comments' rel='facebox' id="<?php echo $not_id; ?>"></br>   <?php echo "check1---$not_id".$comment."";?>
                </a>                  

            </div>

////Another is

      <?php



        echo $_POST['not_id'];  
       $mysql_hostname = "localhost";
      $mysql_user = "root";
      $mysql_password = "";
   $mysql_database = "test";
   $prefix = "";

        $bd = new mysqli($mysql_hostname, $mysql_user,           $mysql_password,$mysql_database) or die("Opps some thing went wrong");


            echo "check2---$not_id";

            $msql_show="select  header_type,notification_main,notification_dis from app_notification where notification_id=$not_id";
            $show_msql=$bd->query($msql_show);

            while($message_show=$show_msql->fetch_assoc())
            {
                $header=$message_show['header_type'];
                $main=$message_show['notification_main'];


            $msql_multi="SELECT file_name FROM biz_logo WHERE    w_id=(SELECT w_id FROM post_job
            WHERE job_id=(SELECT job_id FROM job_notice WHERE 
            notice_id=(SELECT notice_id FROM app_notification where notification_id=$not_id)))";
            }
            $msql_multi=$bd->query($msql_multi);
            while($message_multi=$msql_multi->fetch_assoc())
            {

              $file_name=$message_multi['file_name'];



            }



            print "<center><h1>".$header."$not_id</h1></center>";
    print"<span style='margin-right:50em'><table> 
                 <p><t>".$file_name."</t></p><tr><td>".$main."</td>
    </tr> <tr><td></td></tr></table><span> ";              
            ?>





        <?php }?>
  • 写回答

1条回答 默认 最新

  • doulu7174 2016-04-15 11:16
    关注

    in php manually you can use sessions or if you need

    $_SESSION["favcolor"] = "green";
    $_SESSION["favanimal"] = "cat";
    
    
    <?php
    // Echo session variables that were set on previous page
    echo "Favorite color is " . $_SESSION["favcolor"] . ".<br>";
    echo "Favorite animal is " . $_SESSION["favanimal"] . ".";
    ?>
    

    or if you need use html you can use inputbox and post get method

    评论

报告相同问题?

悬赏问题

  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示
  • ¥15 求三国群英传pl国战时间的修改方法
  • ¥15 matlab代码代写,需写出详细代码,代价私
  • ¥15 ROS系统搭建请教(跨境电商用途)