<input type="text" name="eee" id="eee"/>
     <input type="text" name="lll" id="lll"/> 
<input type="submit" value="qwqw" id="lll" name="itt"/>
<?php
   if(isset($_POST["ttt"]))
        {
           echo $_REQUEST["ttt"];
           $name=$_POST["eee"];
           $images=$_POST["lll"];
           echo $name." ".$images;
        }
?> 当我点击submit时  怎么得到文本框的值呢 

解决方案 »

  1.   

    你的表单中没有名为 ttt 的对象,自然得不到提交的数据
      

  2.   

    你这个写的很不规范,而且你点击了submit后的操作你的代码中也没有写。
    我建议你参考一下这里:http://www.w3school.com.cn/tags/tag_form.asp
    里面完整的叙述了HTML表单的格式。http://www.w3school.com.cn/php/php_post.asp
    这里面说了如何用PHP接受表单数据。
      

  3.   

    你的form标签呢?<form name="ttt" action="" method="POST" ></form>
      

  4.   

    $_REQUEST
    有必要用么?速度快慢些。
      

  5.   

    定义FORM标签,并把ACTION指向本页,这样才能接受POST的数据。比如此页名为:test.php
    写法如下:<form method="post" action="test.php" name="test">
    <input type="text" name="name" />
    <input type="password" name="password>" />
    <input type="submit" value="提交"/></form><?php
    if(isset($_post['name'])){
    $name=$_post['name'];
    $password=$_post['password'];
    echo $name.$password;
    }?>
      

  6.   

    submit 中的name可以省略定义,if判断这样的逻辑也是不太好的