ユーザーを処理してユーザーのホームページにリダイレクトするこのコードがあります。
<?php
$username = $_POST['username'];
$password = $_POST['pwd'];
$file = file_get_contents("userdb.html");
if(!strpos($file, $username)) {
echo "Your username was not found in our database. Please go back and try again.";
} else {
echo "Redirecting...";
if (md5($password) == !strpos($file, (md5($password))) {
echo "Redirecting..."
header ('Location: ./userhome.php')
} else {
print "Whoops! Your password seems to be incorrect. Go back and try again."
}
}
?>
そして、私はエラーが発生します:
Parse error: syntax error, unexpected '{' in userprocess.php on line 11
誰か私に問題を教えてください。if 文の中の if ではないかと思いますが、代替手段として何ができるでしょうか?ありがとう。