Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7729453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:58:17+00:00 2026-06-01T05:58:17+00:00

I have forms which work fine. I have a quiz which works fine. When

  • 0

I have forms which work fine. I have a quiz which works fine.

When I incorporate the two they don’t work fine 🙁

The quiz works as a quiz but it wont send it out using php to my email address.

Here is a bit of my code:

    <head>
      <script>
        CorrectAnswers = new Array();
        CorrectAnswers[0]=1;
        CorrectAnswers[1]=1;
        CorrectAnswers[2]=1;
        CorrectAnswers[3]=2;

        macrightchar='YES';
        macwrongchar='NO';
        winrightchar='YES';
        winwrongchar='NO';

        var platform = 'win'
        if (navigator.appVersion.indexOf('Mac') != -1) {platform = 'mac'}
        if (platform == 'mac') {
            rightchar = unescape(macrightchar)
            wrongchar = unescape(macwrongchar)
        }
        else {
            rightchar = unescape(winrightchar)
            wrongchar = unescape(winwrongchar)
        }

        function CheckAnswer(){
            var i = 0;
            var TotalCorrect = 0;
            var x = 0;
            var Score = 0;

            for (i=0; i<CorrectAnswers.length; i++){
                if (document.QuizForm.elements[i*2].selectedIndex == CorrectAnswers[i]){
                    document.QuizForm.elements[(i*2)+1].value = rightchar;
                    TotalCorrect++;
                }
                else{
                    document.QuizForm.elements[(i*2)+1].value = wrongchar;
                }
            }
                Score = Math.floor((TotalCorrect*100)/CorrectAnswers.length);
                document.CheckForm.ScoreBox.value = Score + '%';
        }
    </script>
    </head>
    <body>
    <form name="QuizForm" accept-charset="utf-8" method="post" action="forms/quiz/_process.php" onSubmit="return validate.check(this)">
        <table class="widthOneHundredPercent">

        <tr>
        <td class="tableCellFloat columnOne" valign="top">
        <label for="Big_Media_offers_a_great_multiplatform_tool">Big Media offers a great multiplatform tool</label>
        </td>
        <td class="tableCellFloat columnTwo" valign="top">
        <select name="0">
        <option>???</option>
        <option>True</option>
        <option>False</option>
        </select>
        <td valign=top>
        <input type="text" name="1" size=2 maxlength=2>
        </td>
        </td>
        </tr>

    <tr>
    <FORM name="CheckForm">
        <td align="center">
        <font face="Geneva,Arial"><input type="button" VALUE="Check" onClick="CheckAnswer()"> Your score is  <input type=text name="ScoreBox" size="4" maxlength="4"></font>
        <center><input type="submit" value="Submit Form" /></center>
        </form>

When submit is pressed it will change the end of my file name in the address bar from quiz.php to quiz.php?ScoreBox=75%25. So it takes my correct answers and wrong answers.

I need the quiz to show a live right and wrong answers when check scores is clicked but I also need to send the results using PHP.

If I’m going at it completely wrong perhaps someone can point me in the right direction to start fresh.

Regards.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T05:58:18+00:00Added an answer on June 1, 2026 at 5:58 am

    Few things I notice here:

    • QuizForm doesn’t have a submit button and does not appear to be submitted dynamically (may just not be shown). Perhaps this form and CheckForm can be combined.
    • CheckForm doesn’t have a method defined, which is why the submit puts a query string on it
    • The score is being submitted instead of the raw answers. Perhaps this is desired behavior, but it leaves the ability for someone to just submit they got a great score.

    The answer could be as simple as moving the submit button from CheckForm to QuizForm.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have many forms which are working fine if i load them via normal
I have three forms: Form1 (Which is Mdi) Form2 (child of mdi) Form3 (child
I have a form created in Windows Forms which is draggable wherever I click.
I have several forms on one page which are submitted using ajaxForm and show
I have a Windows Forms project in Visual Studio 2008, which references a library
I have a form MainForm which is a Windows Forms form that contains many
I have my own textbox which inherits System.Windows.Forms.TextBox I am trying to display texts
I have made a Base Form which is inherited by most Forms in the
I have the following form for photo_album which uses the nested forms feature of
I have taken ownership of an application which is a .net win forms application

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.