var_dump($_POST);
die();
if (isset($_POST['username']) && isset($_POST['email']) && isset($_POST['password'])){
$username = $_POST['username'];
$password = $_POST['password'];
$email = $_POST['email'];
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 "Что-то пошло не так";
}
?>
let array = new Array (0,1,2,3,4,5,6,7);
let arrayFirst = new Array();
let arraySecond = new Array();
let sum = 0;
for (i = 0; i < array.length; i += 1) {
if (i % 2 == 0) {
arrayFirst.push(array[i]);
} else {
arraySecond.push(array[i]);
}
}
for(a = 0; a < arrayFirst.length; a += 1) {
if (arrayFirs[a] == 1 && arraySecond[a] == 1) {
sum += 2;
continue;
}
sum += arrayFirst[a] * arraySecond[a];
}