解析错误:语法错误,意外的“ else”(T_ELSE),预期文件结尾

时间:2019-06-01 20:15:12

标签: php html mysql

我创建了一个登录名/注册人,但是我的注册人当前无法使用,如果我尝试注册时会收到此消息

我试图删除ELSE,但无法正常工作

<?php

 $username = filter_input(INPUT_POST, 'username');
 $password = filter_input(INPUT_POST, 'password');
 if (!empty($username)){
if (!empty($password)){
$dbhost = 'localhost';
   $dbuser = '11111';
   $dbpass = '1111111';
   $dbname = '1111111';
   $conn = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname);
   if(! $conn )
   {
     die('Could not connect to instance: ' . mysqli_error($conn));
   }
   echo 'Connected to MySQL Successfully!';
   mysql_close($conn);
}
     }
else{
    echo "Password should not be empty";
    die();

}
else{
     echo "Username should not be empty";
     die();

 }
?>

解析错误:语法错误,意外的“ else”(T_ELSE),预计第25行的/users/111111/www/connect.php中的文件结尾

0 个答案:

没有答案