Jump to content


Posting to PHP script using a 2-page form

  • Please log in to reply
2 replies to this topic

#1 9999

  • Members
  • PipPipPip
  • Advanced Member
  • 99 posts

Posted 15 August 2006 - 02:48 PM

I am making a quiz that will consist of 10 questions.  The form will post to a PHP script for grading.  Due to space limits I want to put 5 questions on one page (quiz.html) with a continue button on the bottom that takes you to the second page (quiz2.html) were the user will "submit" their answers.  How do you get the answers from the first page to carry over and post with the stuff from page 2?

Thanks in advance

#2 Daniel0

  • Staff Alumni
  • Advanced Member
  • 11,956 posts

Posted 15 August 2006 - 02:50 PM

Store the answers in a session variable, a cookie, or pass them using serialized arrays in hidden form fields.

#3 trq

  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 15 August 2006 - 02:50 PM

Post it to the second page and then either store there values in the session array, or hold them in hidden form fields ready to be submitted with the rest.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users