Answer the question
In order to leave comments, you need to log in
How to fix an error in the authorization file?
Where is the mistake? Please explain, I'm dumb.
<?php
$host = "localhost";
$admin = "root";
$password = "root";
$database = "bigrtm";
$login = $_POST['login'];
$name = $_POST['name'];
$email = $_POST['email'];
$psw = $_POST['psw'];
$tpwd = $_POST['tpwd'];
$info = $_POST['info'];
?>
<?php
if (strlen($login) > 80){
die();
}
if (strlen($login) < 7){
die();
}
if (strlen($name) > 50){
die();
}
if (strlen($name) < 3){
die();
}
if (strlen($email) > 400){
die();
}
if (strlen($email) < 5){
die();
}
if (strlen($psw) > 32){
die();
}
if (strlen($tpwd) > 32){
die();
}
if (strlen($info) > 1000){
die();
}
if ($psw != $tpwd ){
die();
}
?>
<?php
$hash_md = md5($psw);
$date_r = date("Y года, M d, в H:i");
$date_int = date("YmdHis");
$cnnect_database0 = new mysqli($host, $admin, $password, $database);
$query_database0 = $cnnect_database0->query("INSERT INTO `users` (`login`, `name`, `email`, `password`, `info`, `date`, ) VALUES('$login', '$name', '$email', '$hash_md', '$info') ");
?>
<?php
mysqli_connect_error();
setcookie('login', $login, time() + 3600 * 24 * 30, "/");
setcookie('name', $name, time() + 3600 * 24 * 30, "/");
setcookie('pass', $psw, time() + 3600 * 24 * 30, "/");
?>
Answer the question
In order to leave comments, you need to log in
type the text of the error in the browser and get about a million responses
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question