-
Notifications
You must be signed in to change notification settings - Fork 1
/
search_user.php
46 lines (38 loc) · 1.06 KB
/
search_user.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
$title = 'Поиск игрока';
include_once 'protected/sys.php';
if (isset($_POST['nickName']))
{
$nick = htmlspecialchars(trim($_POST['nickName']));
$rowsNick = $db->rows("SELECT `id`,`login` FROM `users` WHERE `login`=?",
array($nick));
if ($rowsNick == 1)
{
$parseD = $db->fetch("SELECT `id`,`login` FROM `users` WHERE `login`=?",
array($nick));
$_SESSION['info'] = 'Игрок найден!';
header("Location:/user?id=".$parseD['id']);
exit;
}
else
{
$_SESSION['error'] = 'Игрок не найден!';
header("Location:/search_user");
exit;
}
}
?>
<div class ='content'/>
<center>
Введите ник того игрока которого хотите найти:<br/>
<form action = '' method='post'/>
<input class ='input' type ='text' name ='nickName' placeholder ='Введите ник'/><br/>
<span class="ubtn inbl green">
<span class="ul">
<input class="ur" type="submit" value="Поиск" />
</span>
</span>
</center>
</div>
<?
include_once $config['root'].'/protected/footermain.php';