anshuman1 Posted February 15, 2013 Share Posted February 15, 2013 Hi Everyone, I am having a problem here. I am trying to send mail to a list of selected people. So I have used check-boxes for multiple select. The list comes from the database. I have used pagination with a limit of 10 records in a page. Now I select say 3 records in page 1 , go to the next page and select 2 from there. I want the mail to be sent to all 5 people when I click submit. But the mail is sent only to the values selected on the page in which I click 'send' , which is the submit button. Is there any way to retain the selected checkbox values ? Thanks in advance, Anshu Quote Link to comment https://forums.phpfreaks.com/topic/274517-carry-check-box-values-to-next-page-without-submitting-the-form/ Share on other sites More sharing options...
anshuman1 Posted February 18, 2013 Author Share Posted February 18, 2013 Any ideas people? Quote Link to comment https://forums.phpfreaks.com/topic/274517-carry-check-box-values-to-next-page-without-submitting-the-form/#findComment-1413076 Share on other sites More sharing options...
Barand Posted February 18, 2013 Share Posted February 18, 2013 One way would be to store them in a session array. Add another checkbox to the forms to flag "Selection complete", or even a second submit button. When that is checked, process all the selection on submission. Quote Link to comment https://forums.phpfreaks.com/topic/274517-carry-check-box-values-to-next-page-without-submitting-the-form/#findComment-1413086 Share on other sites More sharing options...
P5system Posted February 19, 2013 Share Posted February 19, 2013 You can store all the selected value in a Session variable and pass this variable to next page and other wise you can use another approach write an ajax function and save the ID's in a temporary table on checkbox onclick., so when you click submit button fetch all the ids from temp table and send mail once mail is send truncate table. Quote Link to comment https://forums.phpfreaks.com/topic/274517-carry-check-box-values-to-next-page-without-submitting-the-form/#findComment-1413256 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.