I had an idea for something, but realized I had no idea how to implement it, I thought I'd drop it here and see what had to be said.

In a project, I'd like the user to be able to submit any number of complaints about something all on the same page.

Since I dont know how many complaints they have, the best way to have the database understand that is to create a table in mysql that contains the id of the person submitting a complaint, along with the complaint all as columns. Then, for each complaint, a new record. I think that's called a single to many relationship.

Anyways, I dont know how to incorporate this easily into a PHP driven website.

I think I've seen sites that allow the addition of form fields with a push of a button This is probably done with some sort of javascript, but I dont know how or if that could interact with php code and add additional database queries.

Any ideas? Worst case I'll just have a preset amount of complaints and then have them be 'revealed' by javascript, but that's not the perfect solution.

Hopefully that makes sense, and help would be great!