If your page displays ALL messages at once, rather than being paginated, then you could, as you suggest, just pass a yes/no value and execute a query against all the users messages in the database. But if they only check a selection of the messages then you still need to pass this information - that is, which messages were checked - to the other page, using the methods previously discussed.
If the messages are paginated then, assuming they check ALL, you would need the actioning page to be aware of which page they are currently on. That is, to be able to identify which page/group of messages need to be actioned. Or, again, pass the (full) list of current message-ids to the page.
But I'm not fully aware of your set up so the above information may not prove entirely relevant to your site.
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity
." Me Myself & Irene
Validate your HTML