I'm currently designing a survey-type system wherein the system displays the number of persons to be voted using a while loop. Unfortunately, I don't know how to create pages and instead, I can only iterate the whole while loop into one full-page script.

Here's my code:

```
while($fetch=mysql_fetch_array($query1)){

    //Code here

        while($fetch=mysql_fetch_array($query2)){

            //VERIFY ANSWERS
            if(isset($_POST['voted'])){
                if(in_array($_POST['score('.$fetch['questionID'].')'], $radioValue)){
                }
                else{
                    $missed++;
                }

                $checker = true;
            }
        }

            //CHECKER IF A RADIO BUTTON IS MISSED 
            if($checker==true){
                if($missed==$rows || $missed < $rows && $missed != 0 ){
                    echo "<center><font color=red>All items are required</font><br>";
                }
                else{
                    //Some code here
                }
            }

        $query=mysql_query("SELECT * FROM questions");
        while($fetch=mysql_fetch_array($query)){
            //DISPLAYS QUESTIONS WITH QUESTION NUMBER
                            //Some code here

            //DISPLAYS RADIO BUTTONS FROM 1 to 5    
                            //Some code here
            }
        }

    echo "</table>
    <br><center>
    <input type='submit' name='voted' value='Submit'>
}

```

So basically, my code is just a while loop within a while loop

Edit: To make it clear, I'm asking how to separate while loop iterations into "pages" using only one script.

So basically, what I want to happen is:

Nominee 1
Display questions (1 to 9)

Next button

Nominee 2
Display questions (1 to 9) again

Also, it will only re-iterate depending on the number of items the fetch\_array command has gathered.