这是我的代码
我一直收到500内部错误,这意味着它是一个严重的错误,但不确定它可能是什么?
<?php include "dbConfig.php";
$msg = "";
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$name = $_POST["name"];
$password = sha1s($_POST["password"]);
if ($name == '' || $password == '') {
$msg = "You must enter all fields";
} else {
$sql = "SELECT * FROM usrs WHERE username = '$name' AND pw = '$password'";
$query = mysql_query($sql);
if ($query === false) {
echo "Could not successfully run query ($sql) from DB: " . mysql_error();
exit;
}
if (mysql_num_rows($query) > 0) {
header("Location: http://www.google.com");
exit;
}
}
}
?>