<?
if(isset($_POST['nick']) && isset($_GET['ok']))
{
$nick=my_esc($_POST['nick']);
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_user` WHERE `nick` = '$nick'"),0)!=0)
{
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_user` WHERE `nick` = '$nick'"));
header("Location:?user=$ank[id]");
}
else echo err_game("Игрок не найден");
}
echo "<div class='event'><h1>Поиск игроков</h1></div>";
echo "<div class='content'>";
echo "<div class='block'>";
echo "Введите ник игрока:</span><br/><form method='post' action='?search&ok'>";
echo "<input type='text' name='nick' value=''><br/>";
echo "<input type='submit' name='ok' value='Пoиcк'>";
echo "</form></div>";
include_once 'inc/foot.php';
?>