<!-- CONNECT -->
<?php require 'php/connect.php';?>
<!-- REGISTRATION FORM -->
<?php require_once 'comp-reg_form.php';?>
<!-- ACTION -->
<?php require 'php/registration.php';?>
<?php
echo "REGISTRATION PHP-CODE HAVE BEEN CONNECTED";
require 'connect.php';
if (isset($_POST['username']) && isset($_POST['email']) && isset($_POST['password'])){
$username = $_POST['username'];
$password = $_POST['password'];
$email = $_POST['email'];
$query = "INSERT INTO users ('username', 'password', 'email') VALUES ('$username', '$password', '$email')";
$result = mysqli_query($connect, $query);
}
if ($result){
echo "Успешно";
} else {
echo "Что-то пошло не так";
}
?>
<?php
$connect = mysqli_connect('127.0.0.1', 'root', '','jumpnet-wall');
if (!$connect) {
echo "Ошибка: Невозможно установить соединение с MySQL." . PHP_EOL;
echo "Код ошибки errno: " . mysqli_connect_errno() . PHP_EOL;
echo "Текст ошибки error: " . mysqli_connect_error() . PHP_EOL;
exit;
}
echo "Соединение с MySQL установлено!" . PHP_EOL;
echo "Информация о сервере: " . mysqli_get_host_info($connect) . PHP_EOL;
?>
$query = "INSERT INTO users ('username', 'password', 'email') VALUES ('$username', '$password', '$email')";
$result = mysqli_query($connect, $query);
}
if ($result){
echo "Успешно";
} else {
echo "Что-то пошло не так";
}
echo "REGISTRATION PHP-CODE HAVE BEEN CONNECTED";
require 'connect.php';
if (isset($_POST['username']) && isset($_POST['email']) && isset($_POST['password'])){
$username = $_POST['username'];
$password = $_POST['password'];
$email = $_POST['email'];
var_dump($username, $password, $email);
die();
$query = "INSERT INTO users ('username', 'password', 'email') VALUES ('$username', '$password', '$email')";
$result = mysqli_query($connect, $query);
}
if ($result){
echo "Успешно";
} else {
echo "Что-то пошло не так";
}
?>
if (isset($_POST['username']) && isset($_POST['email']) && isset($_POST['password'])){
$username = $_POST['username'];
$password = $_POST['password'];
$email = $_POST['email'];
var_dump($username, $password, $email);
die();
if (isset($_POST['username']) && isset($_POST['email']) && isset($_POST['password'])){
$username = $_POST['username'];
$password = $_POST['password'];
$email = $_POST['email'];
var_dump($_POST);
die();
var_dump($_POST);
die();
if (isset($_POST['username']) && isset($_POST['email']) && isset($_POST['password'])){
$username = $_POST['username'];
$password = $_POST['password'];
$email = $_POST['email'];
$query = "INSERT INTO users (username, password, email) VALUES ('$username', '$password', '$email')";
Соединение с MySQL установлено! Информация о сервере: 127.0.0.1 via TCP/IP
array(4) { ["email"]=> string(12) "Im-t@mail.ru" ["username"]=> string(5) "illia" ["password"]=> string(3) "123" ["confirm_password"]=> string(3) "123" }
Шото не то