我的应用程序中有一个登录页面的问题,我正在做所有事情 - 我想 - 我曾经做过表格,但无法在我的服务器php页面接收数据,请帮助
客户端代码:
<form method="post" action="../control/authentication.php">
<div class="form-group">
<label for="exampleInputEmail1">Email address</label>
<input type="email" name="inputEmail" class="form-control" id="exampleInputEmail1" placeholder="Email">
</div>
<div class="form-group">
<label for="exampleInputPassword1">Password</label>
<input type="password" name="inputPassword" class="form-control" id="exampleInputPassword1" placeholder="Password">
</div>
<div class="checkbox">
<label>
<input type="checkbox"> Remember me
</label>
</div>
<button name="submit" type="submit" class="btn btn-block btn-success">LogIn</button>
<label for="signupButton">Don't have an account? Sign up here</label>
<button name="signup" id="signupButton" type="submit" class="btn btn-block btn-info">SignUp</button>
</form>
服务器端代码:
include_once('../config.php');
require_once(ROOT . 'Connexion.php');
$connect = new Connexion();
if(isset($_POST["inputEmail"]) && isset($_POST["inputPassword"])){
$email=$_POST["inputEmail"];
$pass=$_POST["inputPassword"];
$st = $connect->query("SELECT COUNT(*) FROM client WHERE email='" . $email . "' AND password='" . $pass ."'")->fetch();
if ($st['COUNT(*)'] == 1)
header('Location: index.php');
}
else{
echo 'I didn\'t receive anything!';
}
我每次都收到回音信息(我没有收到任何东西!) 我错过了什么吗?请帮忙!
答案 0 :(得分:1)
将if(isset($_POST["inputEmail"]) && isset($_POST["inputPassword"]))
改为isset($_POST["submit"])
。
答案 1 :(得分:0)
您可以只检查Sub newdata()
Dim awb As Workbook
Dim ws As Worksheet
Dim a_lastrow As Integer 'last row of column A
Dim b_lastrow As Integer 'last row of column B
Set awb = ThisWorkbook
Set ws = awb.Worksheets("Sheet1") 'change "Sheet1" to the name of your sheet
With ws
a_lastrow = .Range("A100000").End(xlUp).Row
b_lastrow = .Range("B100000").End(xlUp).Row
For r = 1 To a_lastrow
If Application.WorksheetFunction.CountIf(.Range("B1:B" & b_lastrow), .Range("A" & r).Value) > 0 Then
.Range("A" & r).Value = "newData"
End If
Next r
End With
MsgBox ("done")
End Sub
,然后获取每个值,因为没有isset($_POST)
。