if (isset($_POST['msg']) && isset($user)) { if(!isset($err)){ mysql_query("INSERT INTO `z_chat` (id, id_room, id_user, time, msg) values('', '".$id."', '$user[id]', '$time', '".my_esc($msg)."')"); $_SESSION['message']='Сообщение успешно добавлено'; header ("Location: ?id=$id"); } }
echo "<form method="post" name='message' action="room.php?id=".$id."">"; echo '<textarea name="msg">'.$respons_msg.'</textarea><br />'; echo '<button type="submit" /></button>'; echo "</form>";