私はPHPのスターターであり、何も入力しなくても、フォームフィールドにすでにルートとパスワードが入力されているような問題があります...助けてください...
<?php
$host="localhost";
$user="root";
$pass="****";
$db="test123";
mysqli_connect($host,$user,$pass);
mysqli_select_db($db);
if(isset($_POST['username']));
{
$username=$_POST['usern'];
$password=$_POST['passw'];
$qry="SELECT * FROM users WHERE name='".$username."'
AND password='".$password."' LIMIT 1 ";
$res=mysql_query($qry);
if(mysqli_stmt_num_rows($res)==1 )
{
echo"You have successfully logged in";
exit();
}
else{
echo"invalid login information";
exit();
}
}
?>
<!doctype html>
<html>
<head>
<title>Untitled Document</title>
</head>
<body>
<form method="post" action="login.php">Username:
<input type="text" name="usern">
<br />
<br />Password:
<input type="password" name="passw">
<br />
<br />
<input type="submit" value="Log In" />
</form>
</body>
</html>
................................................................... .......
OP: ユーザー名: root パスワード: *