First and foremost: Stop Using the MySQL Extension!
It's only showing the first question and its answers because once you finishing looking at every row (more on this in a bit) in the quiz_r table in the first iteration of the outer while loop, you've consumed all of the rows in the result set for the query resource stored in $result2. The internal pointer does not "reset" itself automatically back to the beginning of the set once you reach the end.
However, rather than doing that manually (which is certainly possible), what you should (IMHO) do is use the SQL server in a more intelligent manner. For example, why SELECT all of the rows in quiz_r when you really only care about the ones that match the ID of the question you're currently outputting? Why not only SELECT the answers that are relevant instead?
Now, you might be tempted to agree with that and instead execute more refined SELECT queries inside the loop that processes quiz_q - queries that only SELECT answers from quiz_r WHERE the ID column matches the ID value of the current question. However, note that this would result in a SQL query being executed inside of a loop that's processing another SQL query - this is a huge red flag (IMHO) that indicates a JOIN would be more appropriate.
And now we arrive at my final suggestion: Consider using a single SQL query that JOINs the quiz_q and quiz_r tables together and ORDERs the results by the question ID (or the actual text, whichever seems more appropriate to you). You'd then process the results by keeping track of the question ID you previously encountered (in order to know when you've crossed the boundary from one question to the next). Something like:
$prev_questoin = -1;
while( /* retrieve the next row from the result set as normal here */ )
{
// assuming $row was assigned in the while() condition
if( $row['ID_question'] != $prev_question )
{
// this is a new question - output line breaks, headers, etc. as desired
$prev_question = $row['ID_question'];
}
// output the answer
}