<?php
include "../../classes/autoload.php";

$password = hash("sha256", $_POST["password"]);

$db->query("users", "INSERT INTO `users` (`username`, `email`, `password`,`type`,`initials`,`status`) VALUES ('{$_POST["username"]}', '{$_POST["email"]}', '{$password}','{$_POST["user_type"]}','{$_POST["initials"]}',1)");

echo "<script>window.location.href='home.php';</script>";