<?php
$conn = mysqli_connect('mysql','root','root','user');
if ($conn){
echo'success';
} else{
echo'not success';
}
if(isset($_POST['send'])){
$name = $_POST['name'];
$number = $_POST['phone'];
$login= $_POST['login'];
$password = $_POST['password'];
$query = "INSERT INTO reg VALUES(NULL,$name,$number,$login,$password);";
$r = mysqli_query($conn,$query);
}
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href = 'style.css'>
</head>
<body>
<div class = 'registration'>
<h1>Регистрация</h1> <h6>или <a href = 'auth.html'>Авторизация</a></h6>
<form action="mysqliTestDb.php" method="post">
<label>
<input type = 'text' required name = 'name' placeholder="Введите ваше имя" size="25"><br><br>
<input type = 'tel' required name = 'phone' placeholder="+7-xxx-xx-xx" size="25"><br><br>
<input type = 'text' required name = 'login' placeholder="Придумайте логин" size="25"><br><br>
<input type = 'password' required name = 'password' placeholder="Придумайте пароль" size="25"><br><br>
<input type="submit" name = 'send' value="Отправить">
</label>
</form>
</div>
</body>
</html>
INSERT INTO reg (id, name, phone, login, password) VALUES (NULL,$name,$number,$login,$password);