View file my.php
<? include("head.php"); if(!isset($me))die(); if(!isset($_GET['act'])){ echo "<a href='mail.php'>Личная почта</a><br/> <a href='my.php?act=anketa'>Анкета</a>";} else if($_GET['act']=='anketa') {if(!isset($_POST['sub'])){echo "<form action='my.php?act=anketa' method='post'> Отображаемый логин<br/><input type='text' name='echologin' value='$me[echologin]'><br/> E-Mail<br/><input type='text' name='email' value='$me[email]'><br/> ICQ<br/><input type='text' name='icq' value='$me[icq]'><br/> Крато о себе:<br/><textarea name='osebe' cols='20' rows='4'>$me[osebe]</textarea><br/> <input type='submit' name='sub' value='Редактировать'></form>";} else {$echologin=mysql_real_escape_string(trim(htmlspecialchars($_POST['echologin'])));$email=mysql_real_escape_string(trim(htmlspecialchars($_POST['email']))); $icq=mysql_real_escape_string(trim(htmlspecialchars($_POST['icq'])));$osebe=mysql_real_escape_string(trim(htmlspecialchars($_POST['osebe']))); if(mysql_query("UPDATE `sh_user` SET `echologin`='$echologin', `email`='$email', `icq`='$icq', `osebe`='$osebe' WHERE `id`='$me[id]'"))echo "Отредактировано"; else echo "Ошибка".mysql_error(); } } include("foot.php"); ?>