Member 14656448 Ответов: 1

Фатальная ошибка: неопределенная ошибка, с которой я сталкиваюсь в приведенном ниже кодировании


<!DOCTYPE html>
<html>
<head>
	<title> User login and Registeration Form</title>
	<link rel="stylesheet" type="text/css" href="style.css">
	<link rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
</head>
<body>
<div class="container">
	<div class="login-box">
<div class="row">
	<div class="col-md-6 Login-left">
		<h1>Login Here</h1>
		<form action="validation.php" method="POST">
			<div class="form-group Login-right">
				<label>User Name</label>
				<input type="text" name="User" class="form-control" required>
			</div>

			<div class="form-group">
				<label>Password</label>
				<input type="Password" name="Password" class="form-control" required>
			</div>
			<button type="submit" class="btn btn-primary">Login</button>

		</form>
		
	</div>
</div>

	<div class="col-md-6">
		<h1>Register Here</h1>
		<form action="Registeration.php" method="POST">
			<div class="form-group">
				<label>User Name</label>
				<input type="text" name="User" class="form-control" required>
			</div>

			<div class="form-group">
				<label>Password</label>
				<input type="Password" name="Password" class="form-control" required>
			</div>
			<button type="submit" class="btn btn-primary">Register</button>

		</form>
		</div>
	</div>
</div>
</body>
</html>


Что я уже пробовал:

фатальная ошибка: я сталкиваюсь с фатальными ошибками.

( ! ) Warning: mysqli_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES) in C:\wamp64\www\Userregisteration\registeration.php on line 6
Call Stack
#	Time	Memory	Function	Location
1	0.0017	404344	{main}( )	...\registeration.php:0
2	0.0026	405088	mysqli_connect ( )	...\registeration.php:6

( ! ) Warning: mysqli_select_db() expects parameter 1 to be mysqli, boolean given in C:\wamp64\www\Userregisteration\registeration.php on line 8
Call Stack
#	Time	Memory	Function	Location
1	0.0017	404344	{main}( )	...\registeration.php:0
2	0.0127	405768	mysqli_select_db ( )	...\registeration.php:8

( ! ) Notice: Undefined index: user in C:\wamp64\www\Userregisteration\registeration.php on line 10
Call Stack
#	Time	Memory	Function	Location
1	0.0017	404344	{main}( )	...\registeration.php:0

( ! ) Notice: Undefined index: password in C:\wamp64\www\Userregisteration\registeration.php on line 11
Call Stack
#	Time	Memory	Function	Location
1	0.0017	404344	{main}( )	...\registeration.php:0

( ! ) Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given in C:\wamp64\www\Userregisteration\registeration.php on line 16
Call Stack
#	Time	Memory	Function	Location
1	0.0017	404344	{main}( )	...\registeration.php:0
2	0.0227	405944	mysqli_query ( )	...\registeration.php:16

( ! ) Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given in C:\wamp64\www\Userregisteration\registeration.php on line 19
Call Stack
#	Time	Memory	Function	Location
1	0.0017	404344	{main}( )	...\registeration.php:0
2	0.0253	405944	mysqli_num_rows ( )	...\registeration.php:19

( ! ) Fatal error: Uncaught Error: Call to undefined function mysql_query() in C:\wamp64\www\Userregisteration\registeration.php on line 28
( ! ) Error: Call to undefined function mysql_query() in C:\wamp64\www\Userregisteration\registeration.php on line 28
Call Stack
#	Time	Memory	Function	Location
1	0.0017	404344	{main}( )	...\registeration.php:0

Richard MacCutchan

Где находится PHP-код?

1 Ответов

Рейтинг:
1

Richard MacCutchan

    <input type="text" name="User" class="form-control" required>
</div>

<div class="form-group">
    <label>Password</label>
    <input type="Password" name="Password" class="form-control" required>

( ! ) Notice: Undefined index: user in C:\wamp64\www\Userregisteration\registeration.php on line 10
Call Stack
#	Time	Memory	Function	Location
1	0.0017	404344	{main}( )	...\registeration.php:0

( ! ) Notice: Undefined index: password in C:\wamp64\www\Userregisteration\registeration.php on 


Вы используете другой регистр для имен пользователя и пароля в вашем коде.