I have a form that is processed using PHP code. Its essence is that the person fills the fields, clicks "create!" and in the table with the lobby line is created with the lobby, which created this person. The string is created with the following jQuery code:
$(".submit").click(function(event) { $("#lobbies-list").find("tbody") .append($("<tr>") .append($(" <td>1</td> <td>' .$_SESSION['USER_NAME'].' </td> <td>**Тут должен выводится статус (status)**</td> <td>1\2</td> <td>**а тут ставка** (bet)</td> <td><span>играть!</span></td>") ) ); }) <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <form method="POST" action="/play" class="animation-form"> <input type="text" id="status" name="status" maxlength="23" pattern="{0,23}" placeholder="Статус"> <input type="text" id="bet" name="bet" pattern="[\d+(\.\d{2})?]{1,10}" placeholder="Ставка [формата 9.99]" required> <input type="submit" name="enter" value="создать!" class="submit"> </form> The problem is that the variable ' .$_SESSION['USER_NAME'].' It is correctly displayed in the newly created line, but the same $_POST['status'] , if inserted into the script, does not work. How to make so that in the created row of the table, data which was entered by the user into the form was displayed?