I'll try to make this as clear as I can.
User enters number of guests, selects event, then preferably through an onBlur event, an equal number of input text boxes appear. On submit the guest name(s) will be inserted into a MySQL db.
<form name="guestlist" action="someform.php" method="post>
<table>
<tr>
<td><input type="text" name="GuestNum" onBlur="getNames(this.form)"></td>
</tr>
<!-- repeat this section according to number of guests (GuestNum) specified -->
<tr>
<td><input type="text" name="GuestName[]"></td>
</tr>
<!-- end section -->
<tr>
<td><input type="submit" name="subButton" value="Submit"></td>
</tr>
</table>
</form>
User enters number of guests, selects event, then preferably through an onBlur event, an equal number of input text boxes appear. On submit the guest name(s) will be inserted into a MySQL db.
<form name="guestlist" action="someform.php" method="post>
<table>
<tr>
<td><input type="text" name="GuestNum" onBlur="getNames(this.form)"></td>
</tr>
<!-- repeat this section according to number of guests (GuestNum) specified -->
<tr>
<td><input type="text" name="GuestName[]"></td>
</tr>
<!-- end section -->
<tr>
<td><input type="submit" name="subButton" value="Submit"></td>
</tr>
</table>
</form>