/
Alena228
/
HELP_PLEASE
Обзор
Документация
Войти
/
Alena228
/
HELP_PLEASE
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
reg.php
44 строки
2 KB
ClassUser
Первый коммит
03 фев 2025, 10:50
03 фев 2025, 10:50
f0a4642
Код
Авторство
О чём код?
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <link rel="stylesheet" href="style.css"> </head> <body> <h1>ЛОГИНЬСЯ БЛИН</h1> <form method="POST"> <input type="text" name="login" placeholder="Логин БЛИН"> <input type="password" name="password" placeholder="Пароль БЛИН"> <input type="text" name="name" placeholder="ФИО БЛИН"> <input type="text" name="phone" placeholder="ТЕЛЕФОН БЛИН"> <input type="email" name="email" placeholder="EMAIL БЛИН"> <button type="submit">ХНЫ, ЖМИ БЛИН, ЧТОБЫ ЗАРЕГИСТРАЦИЯ</button> <a href="index.php">есть аккаунт</a> </form> <?php require 'connect.php'; session_start(); if(isset($_POST['login'])&& isset($_POST['password'])&& isset($_POST['name'])&& isset($_POST['phone'])&& isset($_POST['email'])){ $login= $conn->real_escape_string($_POST['login']); $password= $conn->real_escape_string($_POST['password']); $name= $conn->real_escape_string($_POST['name']); $phone= $conn->real_escape_string($_POST['phone']); $email= $conn->real_escape_string($_POST['email']); $sql="INSERT INTO users(login, password, name, phone, email) VALUES ('$login', '$password', '$name' ,'$phone' ,'$email')"; if(empty($login)|| empty($password)|| empty($name)|| empty($phone)|| empty($email)){ echo "ОБШИБСЯ БЛИН"; } if($conn->query($sql)){ header('Location:index.php'); } else{ $connect_error; } } ?> </body> </html>