Как я могу показать значения да и нет не только да
From page1.php I can show answer/s I selected from <select name='question[]'> even if the answers are correct or not. Then on page 2 put the values chosen in a foreach If I chose the correct answers, the results are shown in my table i.e. Q1. What is an apple, Ans. Fruit Q2. What is a PC, Ans. Personal Computer Both will show in my table showing YES, however if do this Q1. What is an apple, A. Tree Q2. What is a PC, A. Personal Computer In my table the result only shows Q2 YES But, I would like to show BOTH YES and NO answers. Any help and or suggestion most appreciated My code, from values in my database table: while ($row = mysqli_fetch_array($query, MYSQLI_ASSOC)) { $quizid = $row["quizid"]; $qno = $row["questionno"]; $question = $row["question"]; $qanswer = $row["answer"]; $qanswer1 = $row["answer1"]; $qanswer2 = $row["answer2"]; $qanswer3 = $row["answer3"]; $qanswer4 = $row["answer4"]; $qanswer5 = $row["answer5"]; $noofquest = $noofquest + 1; foreach($_POST['question'] as $myAns) { if ($myAns == $qanswer) { $qright = $qcorrect; $score = $score + 1; } else { $qright = $qwrong; continue; } My table: echo "<tr class='myTR_2'> <td id='myTD_2' width='50'>$qno</td> <td id='myTD_2' width='450'>$question</td> <td id='myTD_2' width='200'>$myAns</td> <td id='myTD_2' width='100'>$qright</td> </tr>";
Что я уже пробовал:
Столько же а я нашел, ища в Сети, уже около 3 недель