Hello,
Ok my PHP page has a table of 10 rows. Here is an example of what each row contains:
<tr>
<td bgcolor="white">1</td>
<td bgcolor="white"><input type="text" name="authors[1][last_name]" value="<? echo stripslashes($POST1['Last_Name']); ?>" size="16"></td>
<td bgcolor="white"><input type="text" name="authors[1][first_name]" value="<? echo stripslashes($POST1['First_Name']); ?>" size="16"></td>
<td bgcolor="white"><input type="text" name="authors[1][institution]" value="<? echo stripslashes($POST1['Institution']); ?>" size="16"></td>
<td bgcolor="white"><input type="text" name="authors[1][city]" value="<? echo stripslashes($POST1['City']); ?>" size="16"></td>
<td bgcolor="white"><input type="text" name="authors[1][country]" value="<? echo stripslashes($_POST1['Country']); ?>" size="16"></td>
<td bgcolor="white"><input type="radio" name="presenting_author" value="1" checked></td>
</tr>
In each row, only the author number changes --> authors[X][last_name]
Now I want to add a button to add more lines for more authors, in case the user has 15 authors to enter instead of 10. So, if the user presses this button, the page is redisplayed with 15 rows and the fields are also updated from 1 to 15. I would like to have it increased by 5 new authors each time the user presses the button. Now, how I should code this? Could someone help me start? 😕