LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 573|回复: 1

php apache 问题

[复制链接]
发表于 2004-11-13 15:22:22 | 显示全部楼层 |阅读模式
我编写如下程序,但访问时出现下列问题
The requested method POST is not allowed for the URL /ch01.06form.html.
请高手解答。
<html>
  <head>
      <title> 输入资料表单界面</title>  
  </head>
  <body>
  <form method=post acction=http://127.0.0.1/ch01.06.php>
  <table border=0>
  <tr><td>帐号:</td>
      <td><input type=text size=16 name=account></td>
  </tr>
  <tr><td>密码:</td>
      <td><input type=text size=16 name=password></td>
  </tr>
  <tr><td>电子邮箱:</td>
      <td><input type=text size=28 name=email></td>
  
      <button type=submit>确定</button>
      <button type=reset >取消</button>
  </table>  
  </form>
   </boby>
  </html>  

<html>
  <head>
      <title> 显示接收资料页面</title>
  </head>
  <body>
  <?php
  $帐号=$account;
  $密码=$password;
  $电子邮箱=$email;
  echo "你所输入的资料如下:";
  echo "<p>帐号:".$帐号;
  echo "<p>密码: ".$密码;
  echo "<p>E-mail:".$电子邮箱;
  echo "<p>显示的是否正确?";
  ?>
  </boby>
  </html>
发表于 2004-11-13 18:54:39 | 显示全部楼层
html里标签的属性值应该用双引号括起来,例如:
<form method="post" acction="http://127.0.0.1/ch01.06.php">
其它的也一样。
另外,PHP里取得post的值应该用$_POST['account'],其它也一样。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表