当我尝试单击登录按钮时,它给了我错误:“无法发布到 popup.html”
popup.html
<?php
session_start();
require_once 'php/database.php';
$membership = new login();
if($_POST && !empty($_POST['username']) && !empty($_POST['password']) {
$response = $membership->validate_user($_POST['username'], $_POST['password']);
}
?>
<html>
<head>
<link href="ui-style/flat-ui.css" rel="stylesheet" type="text/css"/>
<link href="ext.css" rel="stylesheet" type="text/css"/>
<!-- Bootstrap Scripts -->
<link href="http://twitter.github.io/bootstrap/assets/css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="http://twitter.github.io/bootstrap/assets/css/bootstrap-responsive.css" rel="stylesheet" type="text/css" />
<script src="http://twitter.github.io/bootstrap/assets/js/bootstrap.js"></script> <!-- Bootstrap Scripts -->
</head>
<body>
<div id="login">
<h1>Login</h1>
<form method="post" action="">
<input name="username" type="text" class="span3" value placeholder="Username" id="username"/><br/>
<input name="password" type="password" class="span3" value placeholder="Password" id="password"/><br/>
<button class="btn btn-large btn-success" id="login-btn">Login</button>
</form>
<?php if(isset($response)) echo $response ?>
</div>
</body>
</html>
我究竟做错了什么?
提前致谢!