Files
battles/register.php
T

25 lines
645 B
PHP
Raw Normal View History

2018-03-01 20:43:46 +02:00
<?php
2020-10-27 21:55:51 +02:00
require_once "config.php";
2022-08-09 22:57:43 +03:00
if (
!empty($_POST['login']) &&
!empty($_POST['psw']) &&
!empty($_POST['email']) &&
!empty($_POST['birthday']) &&
!empty($_POST['law']) &&
!empty($_POST['law2']) &&
!empty($_COOKIE[GAMEDOMAIN])
) {
$_SESSION['uid'] = Register::addUser($_POST['login'], $_POST['psw'], $_POST['email'], $_POST['birthday']);
if ($_SESSION['uid'] !== 0) {
$_SESSION['sid'] = session_id();
2022-08-09 22:57:43 +03:00
setcookie(GAMEDOMAIN, $_SESSION['uid'], time() + 3600);
setcookie("battle", time());
header('Location: fight.php');
exit;
2018-01-28 18:40:49 +02:00
}
}
2022-08-09 22:57:43 +03:00
require_once 'views\register.php';