|
- <?php
- if($_SERVER['REQUEST_METHOD'] == "post")
- {
- //require( 'file' );
- if(isset($_REQUEST["data"]))
- {
- echo "成功";
- }
- else
- {
- echo "失败";
- }
- }
- ?>
- <html>
- <head>
- <title> 请您注册</title>
- </head>
- <form class="navbar-form pull-right" action="" method="post">
- <input class="span2" type="text" placeholder="UserName" name="name">
- <input class="span2" type="password" placeholder="Password" name="password">
- <button type="submit" class="btn">提交</button>
- </form>
- </html>
复制代码
用这个if($_SERVER['REQUEST_METHOD'] == "post") 判断可以吗??? |
|