<?
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='block'><h1>Поиск игроков</h1></div>";
echo "<div class='block'>Введите ник гровера:</div><div class='block'><form method='post' action='?search&ok'>";
echo "<input type='text' name='nick' value=''> <input type='submit' name='ok' value='Пoиcк'></div>";
echo "</form></div>";
include_once 'inc/foot.php';
?>