12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- $host = "kurek620.beget.tech";
- $username = "kurek620_baze";
- $password = "6910WASD579h";
- $database = "kurek620_baze";
- $kod = $_POST["check"];
- $mysql = new mysqli($host, $username, $password, $database);
- // Проверка соединения
- if($mysql->connect_error){
- die("Ошибка подключения". $mysql->connect_error);
- }
- session_start();
- $Email = $_SESSION['Email'];
- $login = $_SESSION['login'];
- $passwor = $_SESSION['password'];
- $region = $_SESSION['region'];
- $FIO = $_SESSION['FIO'];
- if($kod == $_SESSION['kod'])
- {
- $query = "INSERT INTO ZUsers (`FIO`, `region`, `login`, `Email`, `password`) VALUES ('$FIO', '$region', '$login', '$Email', '$passwor')";
- if($result = $mysql->query($query))
- {
- $_SESSION['login'] = $login;
- $_SESSION['password'] = $passwor;
- echo "<script>window.location.href = 'index.html';</script>";
- }
- }
- else
- header('Location: EmailCheck.html?message=Неверный+код');
- echo "<script>window.location.href = 'EmailCheck.html';</script>";
- mysqli_close();
- ?>
|