<?php
$name = $email = $password = $repeatpass = '';
$name = $_POST['name'];
$email = $_POST['email'];
$password = $_POST['password'];
$repeatpass = $_POST['repeatpass'];
$con = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);
$sql = "INSERT INTO user-regis (name, email, password, repeatpass) VALUES ('$name', '$email', '$password', '$repeatpass')";
$result = $con->query($sql);
if (!$result) {
header("Location: login.php");
} else {
echo "Error :" . $sql;
}
?>