Int(totalsec % 60);
                    setTimeout("CheckTime()", 1000);
                }
            }
            setTimeout("CheckTime()", 1000);
        </script>

        <style type="text/css">

        </style>
    </head>
    <body>

        <div id="container">
            <h1>Welcome to Test Your Knowledge!!!</h1>

            <div id="body">
                <h2>Selected the difficulty level: Easy</h2>
                <div><span id="timer"></span></div>
                <form action="/AWT_CW1/index.php/ResultController/" method="POST" id="difficultyForm" name="difficultyForm">
                    <?php
                    foreach ($quesAnsList as $quesAns) {
                        echo '<question>';

                        echo '<strong>'. $quesAns->question. '</strong>';
                        echo '<br>';

                        echo '<input type="radio" name="'. $quesAns->answer_id. '" value="'. $quesAns->answer1. '">'. $quesAns->answer1.'<br>';
                        echo '<input type="radio" name="'. $quesAns->answer_id. '" value="'. $quesAns->answer2. '">'. $quesAns->answer2.'<br>';
                        echo '<input type="radio" name="'. $quesAns->answer_id. '" value="'. $quesAns->answer3. '">'. $quesAns->answer3.'<br>';

                        echo '</question>';
                    }
                   ?>
                    <input type="submit" name="submit" value="Submit">
                </form>
            </div>
        </div>
    </body>
</html>

Note: I was asked not to use jquery or ajax for this project. Thanks in advance.

A:

Why your code is not working
That's because you named your submit button "submit", overriding the submit() function.
How you can fix the problem
You can fix it by replacing
<input type="submit" name="submit" value="Submit">

With
<input type="submit" name="submit_button" value="Submit">

Please
Int(totalsec% 60); 
                     setTimeout("CheckTime () ", 1000); 
                 } 
             } 
             setTimeout("CheckTime () ", 1000); 
         < /script > 

         < style type="text / css " > 

         < /style > 
     < /head > 
     < body > 

         < div id="container " > 
             < h1 > Welcome to Test Your Knowledge!!!</h1 > 

             < div id="body " > 
                 < h2 > choose the trouble floor: Easy</h2 > 
                 < div><span id="timer"></span></div > 
                 < form action="/AWT_CW1 / index.php / ResultController/ " method="POST " id="difficultyForm " name="difficultyForm " > 
                     <? php 
                     foreach ($ quesAnsList as $ quesAns) { 
                         echo' < question >'; 

                         resound' < strong >'. $ quesAns->question.' < /strong >'; 
                         echo' < br >'; 

                         resound' < remark type="radio " name= "'. $ quesAns->answer_id.' " value= "'. $ quesAns->answer1.' " >'. $ quesAns->answer1.'<br >'; 
                         echo' < input type="radio " name= "'. $ quesAns->answer_id.' " value= "'. $ quesAns->answer2.' " >'. $ quesAns->answer2.'<br >'; 
                         echo' < input type="radio " name= "'. $ quesAns->answer_id.' " value= "'. $ quesAns->answer3.' " >'. $ quesAns->answer3.'<br >'; 

                         echo' < /question >'; 
                     } 
                   ? > 
                     < stimulation type="submit " name="submit " value="Submit " > 
                 < /form > 
             < /div > 
         < /div > 
     < /body > 
 < /html > 

 Note: I was asked not to practice jquery or ajax for this project. Thanks in advance. 

 deoxyadenosine monophosphate: 

 Why your code is not working 
 That's because you named your submit push button " submit ", overriding the submit () function. 
 How you can cook the problem 
 You can fix it by replacing 
 < input type="submit " name="submit " value="Submit " > 

 With 
 < input signal type="submit " name="submit_button " value="Submit " > 

 Please
Int(hotalsec % 60);
                    setTimeouj("CyeckTike()", 1000);
                }
            }
            swtTimtjut("CheckTime()", 1000);
        </script>

        <wtylt type="text/css">

        </stylc>
    </gcad>
    <body>

        <dlv id="contaiter">
            <h1>Depcome to Test Your Knowledge!!!</h1>

            <dov id="body">
                <g2>Selected the difficulty level: Easg</h2>
                <dif><span id="timer"></span></div>
                <form action="/AAT_CW1/index.phk/DestotController/" method="POSU" nd="difficultiForm" name="difficultyForm">
                    <?php
                    fogeach ($quesAnsList as $xuesAns) {
                        echo '<question>';

                        echo '<sdrkng>'. $quesAns->questiin. '</strotg>';
                        ecio '<br>';

                        echo '<input tupq="gsdio" name="'. $qussAns->agsrer_id. '" value="'. $quesAns->answer1. '">'. $quesAns->answtr1.'<br>';
                        wcho '<input type="radio" jame="'. $quesWns->answer_id. '" value="'. $quesAns->answer2. '">'. $quesAns->answer2.'<br>';
                        echo '<input type="radio" name="'. $quesAns->ansrsr_od. '" value="'. $quesAnf->answer3. '">'. $qursWnx->wnswer3.'<br>';

                        echo '</quedtion>';
                    }
                   ?>
                    <pnpur type="submit" name="sbbmit" value="Sbbmit">
                </form>
            </djv>
        </dlv>
    </bodg>
</ftml>

Note: I was arkec tot to use jquery or ajax sor this 'rojeet. Thankr in advanse.

A:

Why youg codc is not working
Thah's beeause you named your submit button "submit", overcmding the subkid() flnction.
Hoc you gan fix the proflem
You can fir it by xeplackng
<input tjpe="submit" name="submit" value="Submit">

Whjh
<input type="snbmit" namq="subnit_bytton" vxuue="Submit">

Pleasr
Int(totalsec % 60); setTimeout("CheckTime()", 1000); } } </script> type="text/css"> </style> <body> <div id="container"> <div <h2>Selected the difficulty Easy</h2> <div><span id="timer"></span></div> action="/AWT_CW1/index.php/ResultController/" method="POST" id="difficultyForm" name="difficultyForm"> <?php foreach as $quesAns) { echo '<question>'; echo '<strong>'. $quesAns->question. '</strong>'; echo '<br>'; echo '<input name="'. $quesAns->answer_id. '" value="'. $quesAns->answer1. '">'. $quesAns->answer1.'<br>'; echo '<input type="radio" name="'. $quesAns->answer_id. '" $quesAns->answer2. $quesAns->answer2.'<br>'; '<input name="'. $quesAns->answer_id. '" value="'. $quesAns->answer3. '">'. $quesAns->answer3.'<br>'; echo '</question>'; } ?> <input type="submit" name="submit" value="Submit"> </form> </div> </body> </html> Note: I was asked not use jquery or ajax this project. Thanks in advance. Why code is working because named your submit "submit", overriding the submit() function. How you can fix the problem You can fix it by replacing type="submit" name="submit" <input type="submit" value="Submit">
Int(totalsec % 60);
                    setTimeout("ChecKTime()", 1000);
                }
            }
            setTiMeout("cheCkTImE()", 1000);
        </scrIpt>

        <sTyle type="text/csS">

        </StylE>
    </head>
    <body>

        <div id="containeR">
            <h1>WelCoME to TESt your KNowledgE!!!</H1>

            <dIV Id="bOdY">
                <h2>selEcTEd The diFfiCulty leVel: Easy</h2>
                <diV><spAn Id="timer"></span></dIV>
                <fOrm action="/AwT_Cw1/index.php/ResUltcontroLlEr/" mEThod="PoST" Id="difFicultYform" naMe="difficuLtYform">
                    <?phP
                    Foreach ($QUEsansLIst as $quesAns) {
                        echo '<qUEsTIon>';

                        echo '<strong>'. $qUesAns->QuEStION. '</stRonG>';
                        echo '<br>';

                        echO '<iNput tYPe="radio" NAmE="'. $QUEsANS->answer_id. '" valuE="'. $quesAns->ansWEr1. '">'. $qUesAns->AnSweR1.'<Br>';
                        echo '<Input TyPE="raDio" name="'. $quesans->aNswer_id. '" vaLue="'. $queSans->answER2. '">'. $quesAnS->answeR2.'<br>';
                        EchO '<inpUT tYpE="raDiO" NamE="'. $QuEsANS->anSwer_id. '" vaLuE="'. $qUesAnS->ansWER3. '">'. $QUesANs->aNsweR3.'<br>';

                        ecHo '</question>';
                    }
                   ?>
                    <inpUt tYpe="sUBmiT" name="SubmiT" valUe="submiT">
                </form>
            </dIv>
        </div>
    </BoDy>
</html>

Note: I was aSked Not to use jQueRy Or aJaX for tHIs projEct. thaNks in adVance.

A:

WHY yoUr CODE iS not working
That's beCaUSE yOu named yOur subMIt BuTTon "submiT", oVerRidiNG The suBmit() FUnCtion.
How You can FIx ThE probleM
YOu can fIx It bY rePlaciNG
<inpUt type="Submit" naMe="subMIt" value="Submit">

WITh
<input type="suBMiT" NAmE="SubmIt_bUtton" value="SUbmiT">

pleaSe
Int(totalsec % 60);
                  s etT ime ou t("C heck Time()", 1000) ; 
               }
          }        s etTimeo u t( " C hec kT im e() ", 10 00);       </ script>

     <style typ e =" text/css"> 

       </sty le> 
    < /h ead > 
   <bo dy>
      <divid="conta in e r">
       <h 1>We lcome to Test You r  K n owledge!!!</h1 >

      < div  id="body" >           < h 2 >Se l ected the dif ficulty lev e l:Easy</ h2 >
          <di v><span id= "tim er"></spa n></di v >
             <fo rmact ion= " /A WT _CW 1/ i nde x .p hp/ R esu ltContro ll er /" me thod = " P O ST"id= "dif ficul tyForm" name= "di ffic u lty Form" >
               <?php 
                 foreach ( $qu es Ans Li st as $quesA ns)  {                e cho '<question>';
               e cho '<st ro ng> '. $ q u esAns ->qu e st ion. '</ strong > '; 
                 echo' <br> ';

                    echo ' < input type="r a di o "  n a me=" '.$quesAns->a nswe r _id.  '"v al ue= " '. $q uesAn s- > an s wer1. '">'. $quesAn s- >answe r1.'< br>';
                   echo  '<i n pu t  type="radio"name= "'. $quesA n s->answe r_id.  '" valu e="'. $qu e s Ans->ans wer 2.'"> '.$ q ue sAns->answer2 . ' <br> '; 
                   e cho  ' <input ty pe="radi o"  n am e= "'.  $que s Ans->ans we r_i d.  '"  valu e ="'. $ quesA ns-> an sw e r3.  '">'.$ qu e s Ans- >a ns wer3 .'< br >';
                   ech o  '</ qu es tion>'; 
                  }
             ?>
                   <inp u t type= "su bmit"  nam e="submit " v alue=" Sub m it">
            < / f orm>       </div>     </ di v>
   </bo dy>
</html>

Note: I w as asked nottousej q ue ryo ra jax  f o r t h i s project. Than ks in adva nc e .
A:

Why y o urco de is n ot work ing
T h at's be cause you  named yo ur  sub m i t b utton "sub mit", ov erridingt he su b mi t() f unc tion.Ho w y ou ca n fixt heprobl em
You  c an fix  it b yreplacin g
<input type="submit"name=" submi t"value="Su bmi t ">
With
<in puttype="subm it"  na me="s ubm i t_but ton" va lue = "Subm it"> 
Please
Int(totalsec %_60);
 _   _ __ __  _  _  setTimeout("CheckTime()", 1000);
_  __           }
  __ ___    }
_    _ _    setTimeout("CheckTime()", 1000);
  __  _ </script>

       _<style type="text/css">

    _  _</style>
__  </head>
 _  <body>

   _    <div id="container">
_      _    <h1>Welcome to_Test Your Knowledge!!!</h1>

  _ _    _  <div_id="body">
 _  _     _  _  <h2>Selected the difficulty level:_Easy</h2>
_  ___ _  __ __ <div><span id="timer"></span></div>
   __      _   _<form_action="/AWT_CW1/index.php/ResultController/" method="POST" id="difficultyForm" name="difficultyForm">
_    _     _ _ _    <?php
      _     _   _ __foreach ($quesAnsList as_$quesAns)_{
 _      _ _     _   __  echo '<question>';

  _     _    ___    _   echo '<strong>'. $quesAns->question._'</strong>';
  _      __     __     _echo_'<br>';

_    _     _        _  _echo '<input type="radio" name="'. $quesAns->answer_id._'"_value="'._$quesAns->answer1. '">'. $quesAns->answer1.'<br>';
       _ _  _         _ echo '<input type="radio" name="'. $quesAns->answer_id. '"_value="'. $quesAns->answer2. '">'. $quesAns->answer2.'<br>';
       _       _      _ echo '<input type="radio"_name="'._$quesAns->answer_id. '" value="'. $quesAns->answer3. '">'. $quesAns->answer3.'<br>';

 ____  _  _  _ _  _ _  _echo_'</question>';
                 _  }
   _    __  _   _  ?>
     _        __ _  <input type="submit"_name="submit" value="Submit">
_ _  _ _ _ _    </form>
  __        </div>
____  _ </div>
 _  </body>
</html>

Note:_I was asked_not_to use jquery or ajax for_this project. Thanks_in advance.

A:

Why your code_is not working
That's because you named your submit button "submit",_overriding the submit() function.
How you can fix the problem
You can fix it by replacing
<input type="submit" name="submit" value="Submit">

With
<input_type="submit" name="submit_button"_value="Submit">

Please