Having trouble with functions structure not following (PHP)

前端 未结 2 1585
梦毁少年i
梦毁少年i 2021-01-20 00:51


        
2条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-20 01:20

    I think I see the error here, In the PickSession function you have this line of code, within the form,

    
    

    This re-posts the specified module back to the script, you are missing this line under the ShowAssessment function so when the user submits the "Get Student's Answers" form the data is not being posted in the form. Note that you will also have to re-post the session variable within the form as i see you have done but I assume you would want to make it a hidden field as such,

    function ShowAssessment()
    {
        //Sql...
    
         //Line 169 of bottom code sample
         

    //type="hidden" not "text" //Rest of code... }

    I believe adding this will fix your code. Note that you will have to continually re-post all the previously submitted data to maintain this structure of the code.

提交回复
热议问题