<?php

$title ='Возвращение домой';
include_once 'protected/sys.php';

	if (isset($_GET['register']))
	{
		$usersCounter = $db->rows("SELECT COUNT (`id`) FROM `users`");
		$idNew =$usersCounter+1;

		$regUserSql = "INSERT INTO `users` SET `login`=?,`password`=?";
		$passwordNewUs = rand(100000,200000);
		$regUserPh = array("Боец",$passwordNewUs);

		$regUser =  $db->query($regUserSql,$regUserPh);

		$_SESSION['id'] = $db->last();
		$_SESSION['password'] =&$passwordNewUs;

		header("Location:/");
		exit;
	}


	?>

		<div class='menu center'>
		<a href="?attack&amp;register" class="button green">Продолжить путь</a>

		</div>

	<?

include_once 'protected/footermain.php';