当前位置:编程学习 > php >>

php post提交

<body> <div> <p align="right"><!--[if IE]><a href=# onclick="this.style.behavior='url (#default#homepage)';this.setHomePage('http://www.lute.com');">设为首页</a><![endif]-- ></p> <p> </p> <p> </p> <p> </p> <p> </p> </div> <div> <div align="center" class="STYLE1"> <h1 class="STYLE2">www.lute.com</h1> </div> </div> <div> <p align="center" class="STYLE3">Welcome www.lute.com login </p> </div> <div> <table width="100%" border="0"> <tr> <td width="42%"> </td> <td width="16%"><table width="21%" height="22%" border="0"> <tr> <td width="40%" height="50%"><h4><span class="STYLE3"><em>username</em>: </span></h4></td> <td width="54%"><form id="form1" name="form1" method="post" action="YZ.php"> <label> <input name="username_s" type="text" value="" size="10" maxlength="12" /> </label> </form> </td> </tr> <tr> <td height="50%"><h4><span class="STYLE3"><em>password</em>:</span></h4></td> <td><form id="form2" name="form2" method="post" action="YZ.php"> <label> <input name="password_s" type="password" value="" size="10" maxlength="12" /> </label> </form> </td> </tr> </table></td> <td width="42%"> </td> </tr> </table> <div> <table width="100%" border="0"> <tr> <td width="43%"> </td> <td width="8%"><form id="form3" name="form3" method="post" action="YZ.php"> <label> <input type="submit" name="Submit" value="提交" /> </label> </form> </td> <td width="6%"><form id="form4" name="form4" method="post" action=""> <label> <input type="reset" name="Submit2" value="重置" /> </label> </form> </td> <td width="43%"> </td> </tr> </table> <div> <p align="center"> <span class="STYLE4"><a href="pasw.php">忘记密码</a> <a href="zc.php">我要注册</a></span></p> </div> </div> </div> </body>
补充:怎么写一个post获取帐号和密码的PHP文件?
答案:t表单页面

<body>
<div>
  <p align="right"><!--[if IE]><a href=>http://www.lute.com');">设为首页</a><![endif]--

></p>
  <p> </p>
  <p> </p>
  <p> </p>
  <p> </p>
</div>

<div>
  <div align="center" class="STYLE1">
    <h1 class="STYLE2">www.lute.com</h1>
  </div>
</div>
<div>
  <p align="center" class="STYLE3">Welcome www.lute.com login </p>
</div>
<div>
  <table width="100%" border="0">
    <tr>
      <td width="42%"> </td>
      <td width="16%"><table width="21%" height="22%" border="0">
<tr>
<td width="40%" height="50%"><h4><span class="STYLE3"><em>username</em>:

</span></h4></td>
<td width="54%"><form id="form1" name="form1" method="post" action="YZ.php">
<label>
<input name="username_s" type="text" value="" size="10" maxlength="12" />
</label>
</td>
</tr>
<tr>
<td height="50%"><h4><span class="STYLE3"><em>password</em>:</span></h4></td>
<td><label>
<input name="password_s" type="password" value="" size="10" maxlength="12" />
</label>
</td>
</tr>
</table></td>
      <td width="42%"> </td>
    </tr>
  </table>
  <div>
    <table width="100%" border="0">
      <tr>
        <td width="43%"> </td>
        <td width="8%>
          <label>
            <input type="submit" name="Submit" value="提交" />
            </label>
                </td>
        <td width="6%"><label>
            <input type="reset" name="Submit2" value="重置" />
            </label>
        </form>
        </td>
        <td width="43%"> </td>
      </tr>
    </table>
    <div>
      <p align="center">
	    <span class="STYLE4"><a href="pasw.php">忘记密码</a>
	    <a href="zc.php">我要注册</a></span></p>
    </div>
  </div>
</div>
</body>


YZ.php

<?php 

echo  $name = $_post['username_s'];
echo $password = $_post['password_s'];

?>
其他:$_post[name] <?
echo $_POST['username_s'];
echo $_POST['password_s'];

?> 新建一个YZ.php文件(这个文件是你上面form表单action中的)
<?php
$username=$_POST['username_s'];
$password=$_POST['password_s'];
上面就是你想得到的账号和密码
?>

上一个:php 我想写个循环 但是数字是3位的 就是 001 002 003 004 005 006 007 008 009 010 011 前面带有个零
下一个:如何测试PHP有没有开启Php-mbstring、Php-gd两项模块

CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,