created code for user registering
This commit is contained in:
parent
55b34c5070
commit
5aa65fed12
@ -47,6 +47,15 @@
|
||||
|
||||
if (isset($_POST["sub"]))
|
||||
{
|
||||
if (str_starts_with($_POST["sub"], "Registrovat"))
|
||||
{
|
||||
$safe_uname = mysqli_real_escape_string($database, $_POST["username"]);
|
||||
|
||||
$database -> query("INSERT INTO user (username, password) VALUES (\"" . $safe_uname . "\",\"" . hash("sha256", $_POST["password"]) ."\")");
|
||||
} else
|
||||
{
|
||||
echo "log";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
|
Loading…
x
Reference in New Issue
Block a user