JSFiddle - React, Tailwind, and code Playground

JavaScript

class generateQuestionsClass
{
    protected $col= 70; 
    
    protected $row= 15; 
    
    protected $cyleWeekone; 
    
    protected $postDestination= "swithAndProtectSettingQuestionsResponse";
    
    protected $answers = array();
                                
            
    
    public function __construct()
    {
       $this->getAnswersForSwitchAndProtect();

       
    } 
    
   function getAnswersForSwitchAndProtect($userId)
{ 
    global $dbc;

    $select = "
        SELECT
           response_question_one,response_question_two,week_display_id,image_Id";
    $from= "
        FROM 
	    weekly_questions_response";
    $where= "
        WHERE 
	    	user_id='$userId'";
    
    $query = $select.$from.$where;
    
    $result = mysqli_query($dbc, $query);
    
    if(mysqli_num_rows($result))
    {
        return $result ; 
    }
    else
    {
        return false; 
    }
} 
    
    
    
    
    public function questionsWeekOne()
    {
                        
         return "  <form action='index.php?view=$this->postDestination' method='post' >
                        <p>                                                                                                     
                            Question Week Two:  <textarea  name='cycleWeekQuestionOne' cols='$this->col' rows='$this->row' style='font-family: Tahoma; font-size: 12pt' /> </textarea>
                        </P>
                        <p> 
                            Question Week Two:  <textarea  name='cycleWeekquestionTwo' cols='$this->col' rows='$this->row' style='font-family: Tahoma; font-size: 12pt' />{$this->answers[1][1]}</textarea>
                        </P>
                        <input type='hidden' name='cycleWeekId' value='1'>
                        <span class='hideSubmit'><input type='submit'  name='submit'  size='20'  style='font-family: Tahoma; width: 200px; height: 25pt; font-size: 14pt' value='Submit'></span>
                    </form> 
           ...