Error 405 Not Allowed nginx

Hello. I was building my first site and I’ve already done login and register forms. Then I’ve finished register form to send new records to the database and it was working. Every time I’ve filled register form, it was adding new records to the “users” table in my database. Then I was trying to finish login and make sessions, but the problem appeared. I don’t know if it’s caused by database new column I’ve added to the users table, or because of the code in my scripts, but now every time I’m trying to send filled registration form it displays this strange error.

I was trying to step back by sending my working backup files back to the server, didn’t helped. I’ve also removed these new columns from users table, didn’t helped. I’ve deleted all tables and imported from working backup. Still nothing, same error. What is happening? I got 7 php scripts, I don’t know which one should I share.

register.php looks like this:

<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta http-equiv="X-UA-Compatible" content="ie=edge">
		<title>Rejestracja</title>
		<link rel="icon" href="./pic/icon.png">
	</head>
	<body style="background-color:#000000;">
		<main>
			<link rel="stylesheet" type="text/css" href="style.php"/>
		
			<div class="logRegSiteImage">
			<br>
			<div class="logRegSiteText">Fraktomeda</div>
			<div class="logRegSite2Text">Rozległy Wszechświat czeka!</div>
			<br><br><br>
			<div class="logRegSite3Text">Strategiczna gra przeglądarkowa, w której przejmujesz władzę nad planetą, aby wkrótce kolonizować kolejne światy, zawierać sojusze i niszczyć wrogów. To tutaj doświadczysz ogromu Wszechświata, jego wszelkich wspaniałości oraz zjawisk które badane są przez naukowców od wieków. Przejmij dowodzenie już teraz i pokaż, jak buduje się potęgę międzygalaktyczną!</div>
			<br><br>
			<div id="blackBG">
			<a href="./login.php" class="myButtonLOG">Zaloguj się</a>
			<a href="./register.php" class="myButtonREG">Zarejestruj się</a>
			</div>
			<br><br><br>
			<table class="horizontalCenter">
				<thead>
					<tr>
					<th colspan="3" class="logRegSite3Text">Rejestrowanie</th>
					</tr>
				</thead>
				<tbody>
					<form action="registerFinal.php" method="post"><!-- ten fragment inputow jest wysylany submitem do pliku registerFinal.php -->
					<tr class="logRegSiteTextBox">
						<td>login: </td>
						<td><input type="text" placeholder="tak" title="nie" name="loginREGfield" required></td>
					</tr>
					<tr class="logRegSiteTextBox">
						<td>e-mail: </td>
						<td><input type="text" placeholder="tak" title="nie" name="emailREGfield" required></td>
					</tr>
					<tr class="logRegSiteTextBox">
						<td>hasło: </td>
						<td><input type="password" placeholder="tak" title="nie" name="passwordREGfield" required></td>
					</tr>
					<tr class="logRegSiteTextBox">
						<td>powtórz hasło: </td>
						<td><input type="password" placeholder="tak" title="nie" required></td>
					</tr>
					<tr>
						<td></td>
						<td><input type="submit" value="Zarejestruj się" class="myButtonREG"></td>
					</tr>
					</form>

				</tbody>
			</table>
			</div>


		</main>
	</body>
</html>

The registerFinal.php looks like that:

<?php
require("connect.php");

$REGlogin = $_POST['loginREGfield'];
$REGemail = $_POST['emailREGfield'];
$REGpassword = $_POST['passwordREGfield'];

$sql = "INSERT INTO users(users_id, users_username, users_password, users_email, users_galaxy, users_starsystem, users_planet, users_planetid) VALUES ('','$REGlogin','$REGpassword','$REGemail','','','','')";
$result = $conn->query($sql);
?>

And the connect.php looks like this:

<?php
	$conn = mysqli_connect(
	'localhost',
	'xxx',
	'xxx',
	'xxx'
	);
?>

I really don’t know what to do… Backups doesn’t helps… even database backups

Note: this was solved elsewhere (free hosting expired.)

Sponsor our Newsletter | Privacy Policy | Terms of Service