<?php

$login = trim(filter_var($_POST['login'], FILTER_SANITIZE_SPECIAL_CHARS)) ;
$username = trim(filter_var($_POST['username'], FILTER_SANITIZE_SPECIAL_CHARS)) ;
$email = trim(filter_var($_POST['email'], FILTER_SANITIZE_SPECIAL_CHARS)) ;
$password = trim(filter_var($_POST['password'], FILTER_SANITIZE_SPECIAL_CHARS)) ;


$salt = 'qwert';
$password = md5($salt . $password);

//DB
require 'db.php';

$sql = 'INSERT INTO users (login, username, email, password) VALUES (?, ?, ?, ?)';
$query = $pdo->prepare($sql);
$query->execute([$login, $username, $email, $password]);


?>