Here I have an HTML form that stores stores submitted data in a table.
<label> ID: </label><input type="text" name="id"/>
<label>Name :</label><textarea name='Name'></textarea>
<label>Value :</label><br /><input type="text" name="Value"/>
<input type="submit" name="submit" value=" submit "/>
Next time I submit the form, the table refreshes and stores the new values. Instead I need it to add new rows to table and store all previous data I submit during the session. How do I add the new rows without using a data base?
<?php
session_start();
echo "<table>
<tr>
<th>ID</th>
<th>Name</th>
<th>Value</th>
</tr>";
if (isset($_POST['submit'])) {
echo "
<tr>
<td>".$_POST['id']."</td>
<td>".$_POST['Name']."</td>
<td>".$_POST['Value']."</td>
</tr>";
}