<?php
/* Author: t.me/marazm_666 4i4i.su/wm/mrRomanko */
$sitekey = 'КЛЮЧ_САЙТА';
?>
<!DOCTYPE html>
<html>
<head>
<title>Форма регистрации и входа с hCaptcha и MySQLi</title>
<script src="https://hcaptcha.com/1/api.js" async defer></script>
</head>
<body>
<h2>Форма регистрации</h2>
<form method="post" action="register.php">
<label for="username">Имя пользователя:</label>
<input type="text" name="username" required><br><br>
<label for="password">Пароль:</label>
<input type="password" name="password" required><br><br>
<label for="confirm_password">Повторите пароль:</label>
<input type="password" name="confirm_password" required><br><br>
<div class="h-captcha" data-sitekey="<?=$sitekey?>"></div><br><br>
<input type="submit" name="register" value="Регистрация">
</form>
<hr>
<h2>Форма входа</h2>
<form method="post" action="login.php">
<label for="username">Имя пользователя:</label>
<input type="text" name="username" required><br><br>
<label for="password">Пароль:</label>
<input type="password" name="password" required><br><br>
<div class="h-captcha" data-sitekey="<?=$sitekey?>"></div><br><br>
<input type="submit" name="login" value="Авторизация">
</form>
</body>
</html>