<?
echo "<div class=\"trow\">\n";
echo "<a href=\"/anketa.php\">Анкета</a> &gt; Место работы<br />\n";
echo "</div>\n";

if (isset($_GET['set']))
{

if (isset($_POST['mesto_raboty']) && strlen2(esc(stripcslashes(htmlspecialchars($_POST['mesto_raboty']))))<=64)
{
$user['mesto_raboty']=esc(stripcslashes(htmlspecialchars($_POST['mesto_raboty'])));
mysql_query("UPDATE `user` SET `mesto_raboty` = '$user[mesto_raboty]' WHERE `id` = '$user[id]' LIMIT 1");
}
else $err='Место работы не может быть длиннее 64 символов';
header ("Location: anketa.php?ok&".SID."");
exit;
}
err();
aut();

echo "<form method=\"post\" action=\"anketa.php?p=mesto_raboty&amp;set\">\n";
echo "<input type='text' name='mesto_raboty' value='$user[mesto_raboty]' maxlength='64' /><br />\n";
echo "<input value=\"Изменить\" class=\"form\" type=\"submit\" />\n";
echo "</form>\n";


?>
