<?php
$name = $_POST['name'];
$login = $_POST['login'];
$password = $_POST['password'];
$mysql = new mysqli( 'localhost' 'root' 'root' 'users' );
$mysql->query( "INSERT INTO `users` ( `name` , `login` , `password` ) VALUES( '$name', '$login', '$password') " );
$mysql->close()
header( 'location: /' );
?>