Skip to main content
Known Participant
July 13, 2009
Question

Insert checked search results into a new table

  • July 13, 2009
  • 13 replies
  • 1398 views

I've built a search/results page in PHP that returns the names and contact information of people stored in a MySQL database. I've configured the Repeat Region so that there is a checkbox included in each result "cell." I'd like to make it so that a user can check the results he wants, press Submit, and have information from each selected result inserted into a different table as a unique record. How would I do this?

Thanks,

Gabe

This topic is closed to new replies. Start a new post to keep the conversation going.

13 replies

Known Participant
July 14, 2009

Any ideas?

DwFAQ
Participating Frequently
July 14, 2009

I think you already said how to do it. Create a form with a checkbox out of your query results wrapped in a repeated region. In checkbox value of repeated region enter dynamic value of query results. Then submit form to insert record script which is located in your form "action".

Known Participant
July 14, 2009

But what is the dynamic value for the checkbox? The checkbox isn't getting any values anywhere--the user checks it herself to decide whether or not the record will be inserted into a different table--and there might be 1 record, 5 records, 50 records, or anywhere in between based on whatever the search turns up. I'm not sure I understand your answer (I'm more of a designer by trade).