On Thu, June 15, 2006 4:30 am, Ross wrote:
> I have a multiple choice quiz where the questions & answers are
> extracted
> from an external file
>
> $q1 = "what is the capital of Scotland "; $a1 = "Edinburgh"; $b1
> ="Glasgow";
> $c1 ="dundee"; $d1 ="Stirling"; $q1_answer = $a1;
> $q2 = "what is the capital of France"; $a2 = "Lyon"; $b2 ="Paris"; $c2
> ="Carcassonne"; $d2 ="Madrid"; $q2_answer = $b1;
>
> ?>
>
> These are fed into a page which displays the questions and displays a
> radio
> button to select the answer, the page is incremnted when a correct
> answer is
> given
>
> if  ($_POST['x']== $q1_answer) {
> $incrementedPage = $page + 1;
> header("Location: evaluation.php?page=$incrementedPage");
> }
>
> but how can I insert and compare the next question?

$q = ${'q'.$_GET['page']};
echo $q;

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to