Quiz using php little problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • shror

    Quiz using php little problem

    hi every body,
    i have a problem dealing with a quiz system in php.

    the idea is that am building a quiz system by giving a question and
    choices in radio buttons, and after selecting the answer the other
    question is loaded and in the final page a report is displayed showing
    all questions and the correct answers and the score but the problem
    here is that am not able to pass the answer of the first question to
    the second page question, ....... and so on

    i know the idea which is to use a hidden field but i dont know how
    this is happened in a correct way.

    Thanks for any help in advance

    shror


  • Jerry Stuckle

    #2
    Re: Quiz using php little problem

    shror wrote:
    hi every body,
    i have a problem dealing with a quiz system in php.
    >
    the idea is that am building a quiz system by giving a question and
    choices in radio buttons, and after selecting the answer the other
    question is loaded and in the final page a report is displayed showing
    all questions and the correct answers and the score but the problem
    here is that am not able to pass the answer of the first question to
    the second page question, ....... and so on
    >
    i know the idea which is to use a hidden field but i dont know how
    this is happened in a correct way.
    >
    Thanks for any help in advance
    >
    shror

    >
    You could use a hidden field - but I think a session would be better.
    Read up on sessions in the PHP doc.


    --
    =============== ===
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    jstucklex@attgl obal.net
    =============== ===

    Comment

    • Benjamin

      #3
      Re: Quiz using php little problem

      On Mar 6, 4:03 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
      shror wrote:
      hi every body,
      i have a problem dealing with a quiz system in php.
      >
      the idea is that am building a quiz system by giving a question and
      choices in radio buttons, and after selecting the answer the other
      question is loaded and in the final page a report is displayed showing
      all questions and the correct answers and the score but the problem
      here is that am not able to pass the answer of the first question to
      the second page question, ....... and so on
      >
      i know the idea which is to use a hidden field but i dont know how
      this is happened in a correct way.
      >
      Thanks for any help in advance
      >>
      You could use a hidden field - but I think a session would be better.
      Read up on sessions in the PHP doc.
      That would be http://www.php.net/session
      >
      --
      =============== ===
      Remove the "x" from my email address
      Jerry Stuckle
      JDS Computer Training Corp.
      jstuck...@attgl obal.net
      =============== ===

      Comment

      • Mike Roetgers

        #4
        Re: Quiz using php little problem

        shror schrieb:
        hi every body,
        i have a problem dealing with a quiz system in php.
        >
        the idea is that am building a quiz system by giving a question and
        choices in radio buttons, and after selecting the answer the other
        question is loaded and in the final page a report is displayed showing
        all questions and the correct answers and the score but the problem
        here is that am not able to pass the answer of the first question to
        the second page question, ....... and so on
        >
        i know the idea which is to use a hidden field but i dont know how
        this is happened in a correct way.
        >
        Thanks for any help in advance
        >
        shror

        >
        You are looking for sessions. www.php.net/session

        Comment

        • shror

          #5
          Re: Quiz using php little problem

          On Mar 7, 9:17 am, Mike Roetgers <miker...@infor matik.uni-bremen.de>
          wrote:
          shror schrieb:
          >
          >
          >
          hi every body,
          i have a problem dealing with a quiz system in php.
          >
          the idea is that am building a quiz system by giving a question and
          choices in radio buttons, and after selecting the answer the other
          question is loaded and in the final page a report is displayed showing
          all questions and the correct answers and the score but the problem
          here is that am not able to pass the answer of the first question to
          the second page question, ....... and so on
          >
          i know the idea which is to use a hidden field but i dont know how
          this is happened in a correct way.
          >
          Thanks for any help in advance
          >>
          You are looking for sessions.www.php.net/session- Hide quoted text -
          >
          - Show quoted text -
          Thanks for the answers but i think the hidden tags will be easier but
          the problem is that i dont know if my hidden tag is correct or not


          <input type="hidden" name="code" value="<? echo "$code"; ?>">

          where code is a value calculated in the same page where this hidden
          tag is found

          Thanks once more

          shror


          Comment

          • shror

            #6
            Re: Quiz using php little problem

            On Mar 8, 12:15 am, "shror" <shahi...@gmail .comwrote:
            On Mar 7, 9:17 am, Mike Roetgers <miker...@infor matik.uni-bremen.de>
            wrote:
            >
            >
            >
            >
            >
            shror schrieb:
            >
            hi every body,
            i have a problem dealing with a quiz system in php.
            >
            the idea is that am building a quiz system by giving a question and
            choices in radio buttons, and after selecting the answer the other
            question is loaded and in the final page a report is displayed showing
            all questions and the correct answers and the score but the problem
            here is that am not able to pass the answer of the first question to
            the second page question, ....... and so on
            >
            i know the idea which is to use a hidden field but i dont know how
            this is happened in a correct way.
            >
            Thanks for any help in advance
            >>
            You are looking for sessions.www.php.net/session-Hide quoted text -
            >
            - Show quoted text -
            >
            Thanks for the answers but i think the hidden tags will be easier but
            the problem is that i dont know if my hidden tag is correct or not
            >
            <input type="hidden" name="code" value="<? echo "$code"; ?>">
            >
            where code is a value calculated in the same page where this hidden
            tag is found
            >
            Thanks once more
            >
            shrorwww.s7els7 .com- Hide quoted text -
            >
            - Show quoted text -
            oh the reason i want to use hidden tags is that am not using database
            and as much as i know the session needs database

            is this correct

            Thanks

            Comment

            • Rik

              #7
              Re: Quiz using php little problem

              shror <shahirwm@gmail .comwrote:
              >Thanks for the answers but i think the hidden tags will be easier but
              >the problem is that i dont know if my hidden tag is correct or not
              >>
              ><input type="hidden" name="code" value="<? echo "$code"; ?>">
              Lose the quotes around $code. The statement seems OK, no way t otell
              unless you give us the HTML output also.
              >where code is a value calculated in the same page where this hidden
              >tag is found
              >
              oh the reason i want to use hidden tags is that am not using database
              and as much as i know the session needs database
              It doesn't, the standard session implementation in php uses files.
              --
              Rik Wasmus
              Posted on Usenet, not any forum you might see this in.
              Ask Smart Questions: http://tinyurl.com/anel

              Comment

              Working...