123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- $host = "kurek620.beget.tech";
- $username = "kurek620_baze";
- $password = "6910WASD579h";
- $database = "kurek620_baze";
- $mysql = new mysqli($host, $username, $password, $database);
- if($mysql->connect_error){
- die("Ошибка подключения". $mysql->connect_error);
- }
- $id = $_POST["id1"];
- $FIO = $_POST["FIO"];
- $region = $_POST["region"];
- $login = $_POST["login"];
- $Email = $_POST["Email"];
- $passwor = $_POST["password"];
-
- $query = "INSERT INTO Users (`FIO`, `region`, `login`, `Email`, `password`)
- VALUES ('$FIO', '$region', '$login', '$Email', '$passwor')";
- $result = $mysql->query($query);
- if(!$result){
- echo "Что то не так" . $mysql->error;
- }
- else{
-
- $query1 = "DELETE FROM ZUsers WHERE id = $id";
- if ($mysql->query($query1) === TRUE) {
- echo "<script>window.location.href = 'admin_page.php';</script>";
- } else {
- echo "Ошибка при удалении записи: " . $mysql->error;
- }
-
- }
- ?>
|