Question: In PHP , mySQL How do I change $question _ id into $question _ text? Code: In PHP: foreach ( $ _ POST as $question
In PHP mySQL How do I change $questionid into $questiontext?
Code:
In PHP:
foreach$POST as $questionid$answer
echo "inside post loop";
foreach $rows as $row
vardump$row;
echo "looping rows";
if$questionid $rowquestionsid
found the right answer, so check the values are the same
if$answer $rowtext
User answer was correct
arraypush$displayresults, $questionid $answer : Correct!";
$score;
else
User answer was not correct
$iscorrectans $rowtext;
$displayresults$questionid $answer : Wrong! The correct answer was $iscorrectans";
In html:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
