<li> <span>用户名:</span>
          <input id="txtUsername" class="text login_from" type="text" name="userid"/>
</li>
假如我在这里定义了个文本
然后我要在另外1个PHP里面用<param name="InitParams" value="username=<?php echo $_POST["userid"];?>" /> 来得到userid   怎么得到  求高手解决   

解决方案 »

  1.   


    //a.php
    <form action="b.php" method="post">
    <ul>
    <li> <span>用户名:</span>
      <input id="txtUsername" class="text login_from" type="text" name="userid"/>
    </li>
    </ul>
    <input type="submit" value="login"/>
    </form>
    //b.php
    <param name="InitParams" value="username=<?php echo $_POST["userid"];?>" /> 
      

  2.   

    为什么我这里得不到 我也3楼做的一样的阿 
    SL的承载体是PHP页面。,PHP页面上放的是那些代码<param name="InitParams" value="username=<?php echo $_POST["userid"];?>" /> 
      

  3.   

    <param name="InitParams" value="<?php echo $_POST['userid'];?>" />  
      

  4.   

    这样你才能看到//b.php
    <?php echo $_POST["userid"];?> 
      

  5.   

    我想问的是其实他已经传过来了 提交不是我B页面  是传到页面c页面  然后我要在C页面得到这个数据  带没表单提交   怎么得  你们说下 
      

  6.   

    //怎么传?是否这样//b.php
    <?php echo "b:".$_POST["userid"]."<br/>";?>include 'c.php';  //c.php 
    <?php echo "c:".$_POST["userid"];?>
      

  7.   

    include 'c.php';  这句话能传过去么 
      

  8.   

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title><?php echo $cfg_webname; ?>- 浼氬憳鐧诲綍</title>
    <link href="templets/style/login.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="templets/js/jquery142.js"></script>
    <script type="text/javascript">
    function changeAuthCode() {
    var num =  new Date().getTime();
    var rand = Math.round(Math.random() * 10000);
    num = num + rand;
    $('#ver_code').css('visibility','visible');
    if ($("#vdimgck")[0]) {
    $("#vdimgck")[0].src = "../include/vdimgck.php?tag=" + num;
    }
    return false;
    }</script>
    <style type="text/css">
    <!--
    .vermenu{
    background:#FFFFFF none repeat scroll 0 0;
    border:1px solid #EEEEEE;
    position:absolute;
    top: 208px;
    }
    -->
    </style>
    </head>
    <body>
    <?php require DEDEROOT.'/ants/header.php'; ?>
    <div class="wrapper">
      <div class="logo fLeft"> <a href="/"> <img alt="浼氬憳涓績" src="/ants/images/user/logo2.gif"/></a></div>
      <div class="banner fRight"></div>
    </div>
    <div class="login bor">
      <div class="main fLeft">
        <h3>璇峰湪杩欓噷鐧诲綍<em><a href="index_do.php?fmdo=user&dopost=regnew">杩樻病娉ㄥ唽 鐐瑰嚮杩欓噷</a></em></h3>
        <form name='form1' method='POST' action='index_do.php'>
          <input type="hidden" name="fmdo" value="login">
          <input type="hidden" name="dopost" value="login">
      <input type="hidden" name="forward" value="<?php if(isset($_GET['forward'])) echo $forward;?>">
    <input type="hidden" name="gourl" value="<?php echo (!isset($_GET[t]))?$_SERVER['HTTP_REFERER']:'';?>">
         <!--<input type="hidden" name="gourl" value="<?php if(!empty($gourl)) echo $gourl;?>">-->
          <ul>
            <li> <span>鐢ㄦ埛鍚嶏細</span>
              <input id="txtUsername" class="text login_from" type="text" name="userid"/>
            </li>
            <li> <span>瀵�nbsp;&nbsp;&nbsp;鐮侊細</span>
              <input id="txtPassword" class="text login_from2" type="password" name="pwd"/>
            </li>
            <li> <span>楠岃瘉鐮侊細</span>
              <input id="vdcode" class="text login_from3" type="text" style="width: 50px; text-transform: uppercase;" name="vdcode"/>
              <img id="vdimgck" align="absmiddle" onclick="this.src=this.src+'?'" style="cursor: pointer;"  src="../include/vdimgck.php"/>
               鐪嬩笉娓咃紵 <a  style="cursor:pointer" onclick="changeAuthCode();">鐐瑰嚮鏇存崲</a> </li>
            <li> <span>鏈夋晥鏈燂細</span>
              <input type="radio" value="2592000" name="keeptime" id="ra1"/>
              <label for="ra1">涓�釜鏈�/label>
              <input type="radio" checked="checked" value="604800" name="keeptime" id="ra2"/>
              <label for="ra2">涓�懆</label>
              <input type="radio" value="86400" name="keeptime"  id="ra3"/>
              <label for="ra3">涓�ぉ</label>
              <input type="radio" value="3600" name="keeptime"  id="ra4"/>
              <label for="ra4">涓�皬鏃�/label></li>
            <li>
              <button id="btnSignCheck" class="button2" type="submit">鐧�nbsp;褰�/button>
              <a href="resetpassword.php">蹇樿瀵嗙爜锛�/a> </li>
          </ul>
        </form>
      </div>
      <div class="login_sidebar fRight">
        <p><span>杩樻病鏈夋敞鍐屽悧锛�/span><br />
          鏈珯鐨勮处鍙烽兘娌℃湁锛熶綘涔熷お钀戒紞浜�br />
          璧剁揣鍘绘敞鍐屼竴涓惂銆�/p>
        <button class="signUp" onclick="javascript:location='index_do.php?fmdo=user&dopost=regnew'">娉ㄥ唽</button>
      </div>
    </div>
    <?php require DEDEROOT.'/ants/footer.php'; ?>
    </body>
    </html>