connect_error) { die("Connection failed Jelby:" . $conn->connect_error); } if ($_SESSION["loggedin"]) { $all_questions_array = [ "SELECT Q1 FROM didactic_starthere WHERE username = '$username'", "SELECT Q2 FROM didactic_starthere WHERE username = '$username'", "SELECT Q3 FROM didactic_starthere WHERE username = '$username'", "SELECT Q4 FROM didactic_starthere WHERE username = '$username'", "SELECT Q5 FROM didactic_starthere WHERE username = '$username'", "SELECT Q6 FROM didactic_starthere WHERE username = '$username'", "SELECT Q7 FROM didactic_starthere WHERE username = '$username'", "SELECT Q1 FROM didactic_diagnostic WHERE username = '$username'", "SELECT Q2 FROM didactic_diagnostic WHERE username = '$username'", "SELECT Q3 FROM didactic_diagnostic WHERE username = '$username'", "SELECT Q4 FROM didactic_diagnostic WHERE username = '$username'", "SELECT Q5 FROM didactic_diagnostic WHERE username = '$username'", "SELECT Q1 FROM didactic_tools WHERE username = '$username'", "SELECT Q2 FROM didactic_tools WHERE username = '$username'", "SELECT Q3 FROM didactic_tools WHERE username = '$username'", "SELECT Q4 FROM didactic_tools WHERE username = '$username'", "SELECT Q5 FROM didactic_tools WHERE username = '$username'", "SELECT Q1 FROM didactic_embo WHERE username = '$username'", "SELECT Q2 FROM didactic_embo WHERE username = '$username'", "SELECT Q3 FROM didactic_embo WHERE username = '$username'", "SELECT Q1 FROM didactic_nvir WHERE username = '$username'", "SELECT Q2 FROM didactic_nvir WHERE username = '$username'", "SELECT Q3 FROM didactic_nvir WHERE username = '$username'", "SELECT Q1 FROM didactic_venous_access WHERE username = '$username'", "SELECT Q2 FROM didactic_venous_access WHERE username = '$username'", "SELECT Q3 FROM didactic_venous_access WHERE username = '$username'", "SELECT Q1 FROM didactic_deep_venous WHERE username = '$username'", "SELECT Q2 FROM didactic_deep_venous WHERE username = '$username'", "SELECT Q3 FROM didactic_deep_venous WHERE username = '$username'", "SELECT Q1 FROM didactic_gi_biliary WHERE username = '$username'", "SELECT Q2 FROM didactic_gi_biliary WHERE username = '$username'", "SELECT Q3 FROM didactic_gi_biliary WHERE username = '$username'", "SELECT Q1 FROM didactic_urinary WHERE username = '$username'", "SELECT Q2 FROM didactic_urinary WHERE username = '$username'", "SELECT Q3 FROM didactic_urinary WHERE username = '$username'", "SELECT Q1 FROM didactic_call_prep WHERE username = '$username'", "SELECT Q1 FROM didactic_noninvasive WHERE username = '$username'", "SELECT Q2 FROM didactic_noninvasive WHERE username = '$username'", "SELECT Q3 FROM didactic_noninvasive WHERE username = '$username'", "SELECT Q1 FROM didactic_aorta WHERE username = '$username'", "SELECT Q2 FROM didactic_aorta WHERE username = '$username'", "SELECT Q3 FROM didactic_aorta WHERE username = '$username'", "SELECT Q1 FROM didactic_arterial_trauma WHERE username = '$username'", "SELECT Q2 FROM didactic_arterial_trauma WHERE username = '$username'", "SELECT Q1 FROM didactic_arterial_visceral WHERE username = '$username'", "SELECT Q2 FROM didactic_arterial_visceral WHERE username = '$username'", "SELECT Q3 FROM didactic_arterial_visceral WHERE username = '$username'", "SELECT Q1 FROM didactic_pe WHERE username = '$username'", "SELECT Q2 FROM didactic_pe WHERE username = '$username'", "SELECT Q3 FROM didactic_pe WHERE username = '$username'", "SELECT Q1 FROM didactic_esrd WHERE username = '$username'", "SELECT Q2 FROM didactic_esrd WHERE username = '$username'", "SELECT Q3 FROM didactic_esrd WHERE username = '$username'", "SELECT Q1 FROM didactic_reproductive WHERE username = '$username'", "SELECT Q2 FROM didactic_reproductive WHERE username = '$username'", "SELECT Q3 FROM didactic_reproductive WHERE username = '$username'", "SELECT Q4 FROM didactic_reproductive WHERE username = '$username'", "SELECT Q5 FROM didactic_reproductive WHERE username = '$username'", "SELECT Q1 FROM didactic_msk WHERE username = '$username'", "SELECT Q2 FROM didactic_msk WHERE username = '$username'", "SELECT Q3 FROM didactic_msk WHERE username = '$username'", "SELECT Q1 FROM didactic_onc_ablation WHERE username = '$username'", "SELECT Q2 FROM didactic_onc_ablation WHERE username = '$username'", "SELECT Q3 FROM didactic_onc_ablation WHERE username = '$username'", "SELECT Q1 FROM didactic_onc_ldt WHERE username = '$username'", "SELECT Q2 FROM didactic_onc_ldt WHERE username = '$username'", "SELECT Q3 FROM didactic_onc_ldt WHERE username = '$username'", "SELECT Q1 FROM didactic_portal WHERE username = '$username'", "SELECT Q2 FROM didactic_portal WHERE username = '$username'", "SELECT Q3 FROM didactic_portal WHERE username = '$username'", "SELECT Q1 FROM didactic_transplant WHERE username = '$username'", "SELECT Q2 FROM didactic_transplant WHERE username = '$username'", "SELECT Q3 FROM didactic_transplant WHERE username = '$username'", "SELECT Q1 FROM didactic_pad WHERE username = '$username'", "SELECT Q2 FROM didactic_pad WHERE username = '$username'", "SELECT Q3 FROM didactic_pad WHERE username = '$username'", "SELECT Q1 FROM didactic_superficial_venous WHERE username = '$username'", "SELECT Q2 FROM didactic_superficial_venous WHERE username = '$username'", "SELECT Q1 FROM didactic_endocrine WHERE username = '$username'", "SELECT Q2 FROM didactic_endocrine WHERE username = '$username'", "SELECT Q1 FROM didactic_lymphatic WHERE username = '$username'", "SELECT Q2 FROM didactic_lymphatic WHERE username = '$username'", "SELECT Q1 FROM didactic_physics WHERE username = '$username'", "SELECT Q2 FROM didactic_physics WHERE username = '$username'", "SELECT Q3 FROM didactic_physics WHERE username = '$username'", "SELECT Q1 FROM anatomy_venous WHERE username = '$username'", "SELECT Q2 FROM anatomy_venous WHERE username = '$username'", "SELECT Q3 FROM anatomy_venous WHERE username = '$username'", "SELECT Q4 FROM anatomy_venous WHERE username = '$username'", "SELECT Q5 FROM anatomy_venous WHERE username = '$username'", "SELECT Q6 FROM anatomy_venous WHERE username = '$username'", "SELECT Q7 FROM anatomy_venous WHERE username = '$username'", "SELECT Q8 FROM anatomy_venous WHERE username = '$username'", "SELECT Q101 FROM anatomy_arterial WHERE username = '$username'", "SELECT Q102 FROM anatomy_arterial WHERE username = '$username'", "SELECT Q103 FROM anatomy_arterial WHERE username = '$username'", "SELECT Q104 FROM anatomy_arterial WHERE username = '$username'", "SELECT Q105 FROM anatomy_arterial WHERE username = '$username'", "SELECT Q106 FROM anatomy_arterial WHERE username = '$username'", "SELECT Q107 FROM anatomy_arterial WHERE username = '$username'", "SELECT Q108 FROM anatomy_arterial WHERE username = '$username'", "SELECT Q109 FROM anatomy_arterial WHERE username = '$username'", "SELECT Q110 FROM anatomy_arterial WHERE username = '$username'", "SELECT Q111 FROM anatomy_arterial WHERE username = '$username'", "SELECT Q112 FROM anatomy_arterial WHERE username = '$username'", "SELECT Q113 FROM anatomy_arterial WHERE username = '$username'", "SELECT Q114 FROM anatomy_arterial WHERE username = '$username'", "SELECT Q115 FROM anatomy_arterial WHERE username = '$username'", "SELECT Q116 FROM anatomy_arterial WHERE username = '$username'", "SELECT Q117 FROM anatomy_arterial WHERE username = '$username'", "SELECT Q118 FROM anatomy_arterial WHERE username = '$username'", "SELECT Q119 FROM anatomy_arterial WHERE username = '$username'", "SELECT Q120 FROM anatomy_arterial WHERE username = '$username'", "SELECT Q121 FROM anatomy_arterial WHERE username = '$username'", "SELECT Q122 FROM anatomy_arterial WHERE username = '$username'", "SELECT Q123 FROM anatomy_arterial WHERE username = '$username'", "SELECT Q124 FROM anatomy_arterial WHERE username = '$username'", "SELECT Q125 FROM anatomy_arterial WHERE username = '$username'", "SELECT Q126 FROM anatomy_arterial WHERE username = '$username'", "SELECT Q127 FROM anatomy_arterial WHERE username = '$username'", "SELECT Q128 FROM anatomy_arterial WHERE username = '$username'", "SELECT Q129 FROM anatomy_arterial WHERE username = '$username'", "SELECT Q130 FROM anatomy_arterial WHERE username = '$username'", "SELECT Q131 FROM anatomy_arterial WHERE username = '$username'", "SELECT Q132 FROM anatomy_arterial WHERE username = '$username'", "SELECT Q133 FROM anatomy_arterial WHERE username = '$username'", "SELECT Q134 FROM anatomy_arterial WHERE username = '$username'", "SELECT Q201 FROM anatomy_portal WHERE username = '$username'", "SELECT Q202 FROM anatomy_portal WHERE username = '$username'", "SELECT Q203 FROM anatomy_portal WHERE username = '$username'", "SELECT Q204 FROM anatomy_portal WHERE username = '$username'", "SELECT Q205 FROM anatomy_portal WHERE username = '$username'", "SELECT Q206 FROM anatomy_portal WHERE username = '$username'", "SELECT Q301 FROM anatomy_nonvasc WHERE username = '$username'", "SELECT Q302 FROM anatomy_nonvasc WHERE username = '$username'", "SELECT Q303 FROM anatomy_nonvasc WHERE username = '$username'", "SELECT Q304 FROM anatomy_nonvasc WHERE username = '$username'", "SELECT Q305 FROM anatomy_nonvasc WHERE username = '$username'", "SELECT Q401 FROM anatomy_ct WHERE username = '$username'", "SELECT Q402 FROM anatomy_ct WHERE username = '$username'", "SELECT Q403 FROM anatomy_ct WHERE username = '$username'", "SELECT Q404 FROM anatomy_ct WHERE username = '$username'", "SELECT Q405 FROM anatomy_ct WHERE username = '$username'", "SELECT Q501 FROM anatomy_variants WHERE username = '$username'", "SELECT Q502 FROM anatomy_variants WHERE username = '$username'", "SELECT Q503 FROM anatomy_variants WHERE username = '$username'", "SELECT Q504 FROM anatomy_variants WHERE username = '$username'", "SELECT Q505 FROM anatomy_variants WHERE username = '$username'", "SELECT Q506 FROM anatomy_variants WHERE username = '$username'" ]; $array_count= 0; $question_status = array(); $answer = array(); $array_row = array(); $value = array(); $final_array = array(); while ($array_count < count($all_questions_array)){ $sql = $all_questions_array[$array_count] ; $result = $link->query($sql); $row = mysqli_fetch_assoc($result); $value= array_values($row); $only = $value[0]; array_push($final_array,$only); //creates array of sums,now just strings **works** $array_count +=1; } } $conn->close(); ?>
TeachingIR.com |
logged in: |
---|