How to remember radio-button state after submit

I made a script that read table from database without problem using some kind of pagination. In order to make more efficient I added small form where a user is able to make choice to read all records or those that have marked “as new” (e.g in one field have 1 or 0). When a user click on radio-button NEW MESSAGE query shows correct rows from table and set up pagination and the proper radio-button is checked until I page is re-loaded after a user click on Next or Previous. How to keep state of picked radio-button independent of pagination?:td: