У меня есть система с 2-страничной формой. Первая форма страницы - это «публикация некоторой переменной путем отправки, а вторая страница использует переменную post в качестве входных данных и вставки в mysqlОчищает форму POST-записи, когда я нажимаю назад (-1)
Теперь моя проблема в том, что, когда одна кнопка браузера нажимает кнопку со второй страницы, он теряет все свои записи первой страницы ...!
Как я могу сохранить первую форму entris, когда один гол от второй формы
<table align='center'>
<form method='post' action='addcd.php'>
<tr>
<td><div class='tabdata' align="right">Well No: </div></td>
<td ><input type="text" name="no" autocomplete="off" required="required" class='tfield' /></td>
</tr>
<tr>
<td><div class='tabdata' align="right">Well Name</td>
<td ><input type="text" name="name" id="name" autocomplete="off" required="required" class='tfield'/></td>
<td width="40%" align="left"><div class='tfield' id="status"></div></td>
</tr>
<tr>
<td><div class='tabdata' align="right">No of Logs in CD</td>
<td><input type='number' name='nologs' autocomplete="off" min="1" max="5" required="required" class='tfield'/></td>
<td> </td>
</tr>
<tr>
<td colspan='12' align='center'><input type='submit' value='ADD A CD' name='submit' class='button'/></td>
</tr>
</form>
</table>
Этот код addcd.php
<table align="center">
<?php
$wno = $_POST['no'];
$wname = $_POST['name'];
?>
<form method='post' action='' name="cdplus">
<tr>
<td colspan='2' align="center"><input type='text' name='no' class='tfield' value="<?php echo$wno?>" readonly /></td>
<td colspan='3' align="center"><input type='text' name='name' class='tfield' value="<?php echo$wname?>" readonly /></td>
</tr>
<tr>
<th class='tabd'>Curve Status</th>
<th class='tabd'>Log</th>
<th class='tabd'>Top Depth</th>
<th class='tabd'>Bottom Depth</th>
<th class='tabd'>Date of Log</th>
</tr>
<?php
$number=$_POST['nologs'];
for($i=1;$i<=$number;$i++){
?>
<tr>
<th colspan="5" align="center" class='tabdata'>File No: <?php echo$i?></th>
</tr>
<tr>
<td>
<input name='status[]' type='text' required="required" placeholder="Curve Status" autocomplete="off" class='tabdata'>
</td>
<td>
<input name='logs[]' type='text' required="required" placeholder="Logs" autocomplete="off" class='tabdata'>
</td>
<td>
<input type='number' required="required" name='bottom[]' placeholder="Bottom Depth" class='tabdata'>
</td>
<td>
<input type='number' required="required" name='top[]' placeholder="Top Depth" class='tabdata'>
</td>
<td><input type='text' required="required" name='date[]' placeholder="Date of Logging" class="tabd" ></td>
</tr>
<tr>
<td colspan="5"> </td>
</tr>
<?php } ?>
<tr>
<td colspan='5' align='center'><input type='submit' value='Save' name='submit' class='button'/></td>
</tr>
</form>
</table>
разместить Ваш код addcd.php – affaz
отвечал addcd.php – user3521051
прост: использование сессий –