<strong><font color="#FF0000">
<?
echo $score;
//echo $_SESSION['MEM_USER'];
if ($_POST['test']==1){
$sql="select * from member where mem_user='".$_SESSION['MEM_USER']."' and mem_pretest_value<'".$score."' or mem_pretest_value is null";
}else if ($_POST['test']==2){
$sql="select * from member where mem_user='".$_SESSION['MEM_USER']."' and mem_score1<'".$score."' or mem_score1 is null";
}else if ($_POST['test']==3){
$sql="select * from member where mem_user='".$_SESSION['MEM_USER']."' and mem_score2<'".$score."'or mem_score2 is null";
}else if ($_POST['test']==4){
$sql="select * from member where mem_user='".$_SESSION['MEM_USER']."' and mem_score3<'".$score."' or mem_score3 is null";
}else if ($_POST['test']==5){
$sql="select * from member where mem_user='".$_SESSION['MEM_USER']."' and mem_score4<'".$score."' or mem_score4 is null";
}else if ($_POST['test']==6){
$sql="select * from member where mem_user='".$_SESSION['MEM_USER']."' and mem_score5<'".$score."' or mem_score5 is null";
}else if ($_POST['test']==7){
$sql="select * from member where mem_user='".$_SESSION['MEM_USER']."' and mem_score6<'".$score."' or mem_score6 is null";
}else if ($_POST['test']==8){
$sql="select * from member where mem_user='".$_SESSION['MEM_USER']."' and mem_score7<'".$score."' or mem_score7 is null";
}else if ($_POST['test']==9){
$sql="select * from member where mem_user='".$_SESSION['MEM_USER']."' and mem_score8<'".$score."' or mem_score8 is null";
}else if ($_POST['test']==10){
$sql="select * from member where mem_user='".$_SESSION['MEM_USER']."' and mem_score9<'".$score."' or mem_score9 is null";;
}else if ($_POST['test']==11){
$sql="select * from member where mem_user='".$_SESSION['MEM_USER']."' and mem_score10<'".$score."' or mem_score10 is null";
}else if ($_POST['test']==12){
$sql="select * from member where mem_user='".$_SESSION['MEM_USER']."' and mem_score11<'".$score."' or mem_score11 is null";
}else if ($_POST['test']==13){
$sql="select * from member where mem_user='".$_SESSION['MEM_USER']."' and mem_score12<'".$score."' or mem_score12 is null";
}else if ($_POST['test']==14){
$sql="select * from member where mem_user='".$_SESSION['MEM_USER']."' and mem_score13<'".$score."' or mem_score13 is null";
}else if ($_POST['test']==15){
$sql="select * from member where mem_user='".$_SESSION['MEM_USER']."' and mem_score14<'".$score."' or mem_score14 is null";
}else if ($_POST['test']==16){
$sql="select * from member where mem_user='".$_SESSION['MEM_USER']."' and mem_score15<'".$score."' or mem_score15 is null";
}else if ($_POST['test']==17){
$sql="select * from member where mem_user='".$_SESSION['MEM_USER']."' and mem_score16<'".$score."' or mem_score16 is null";
}else if ($_POST['test']==18){
$sql="select * from member where mem_user='".$_SESSION['MEM_USER']."' and mem_score17<'".$score."' or mem_score17 is null";
}else if ($_POST['test']==19){
$sql="select * from member where mem_user='".$_SESSION['MEM_USER']."' and mem_score18<'".$score."' or mem_score18 is null";
}else if ($_POST['test']==20){
$sql="select * from member where mem_user='".$_SESSION['MEM_USER']."' and mem_score_post<'".$score."' or mem_score_post is null"; }
$rs=mysql_query($sql);
$numrow=mysql_num_rows($rs);
if ($numrow>0 ) {
if ($_POST['test']==1){
$sql = "update member set mem_pretest_value='".$score."' where mem_user='".$_SESSION['MEM_USER']."'";
}else if ($_POST['test']==2){
$sql = "update member set mem_score1='".$score."' where mem_user='".$_SESSION['MEM_USER']."'";
}else if ($_POST['test']==3){
$sql = "update member set mem_score2='".$score."' where mem_user='".$_SESSION['MEM_USER']."'";
}else if ($_POST['test']==4){
$sql = "update member set mem_score3='".$score."' where mem_user='".$_SESSION['MEM_USER']."'";
}else if ($_POST['test']==5){
$sql = "update member set mem_score4='".$score."' where mem_user='".$_SESSION['MEM_USER']."'";
}else if ($_POST['test']==6){
$sql = "update member set mem_score5='".$score."' where mem_user='".$_SESSION['MEM_USER']."'";
}else if ($_POST['test']==7){
$sql = "update member set mem_score6='".$score."' where mem_user='".$_SESSION['MEM_USER']."'";
}else if ($_POST['test']==8){
$sql = "update member set mem_score7='".$score."' where mem_user='".$_SESSION['MEM_USER']."'";
}else if ($_POST['test']==9){
$sql = "update member set mem_score8='".$score."' where mem_user='".$_SESSION['MEM_USER']."'";
}else if ($_POST['test']==10){
$sql = "update member set mem_score9='".$score."' where mem_user='".$_SESSION['MEM_USER']."'";
}else if ($_POST['test']==11){
$sql = "update member set mem_score10='".$score."' where mem_user='".$_SESSION['MEM_USER']."'";
}else if ($_POST['test']==12){
$sql = "update member set mem_score11='".$score."' where mem_user='".$_SESSION['MEM_USER']."'";
}else if ($_POST['test']==13){
$sql = "update member set mem_score12='".$score."' where mem_user='".$_SESSION['MEM_USER']."'";
}else if ($_POST['test']==14){
$sql = "update member set mem_score13='".$score."' where mem_user='".$_SESSION['MEM_USER']."'";
}else if ($_POST['test']==15){
$sql = "update member set mem_score14='".$score."' where mem_user='".$_SESSION['MEM_USER']."'";
}else if ($_POST['test']==16){
$sql = "update member set mem_score15='".$score."' where mem_user='".$_SESSION['MEM_USER']."'";
}else if ($_POST['test']==17){
$sql = "update member set mem_score16='".$score."' where mem_user='".$_SESSION['MEM_USER']."'";
}else if ($_POST['test']==18){
$sql = "update member set mem_score17='".$score."' where mem_user='".$_SESSION['MEM_USER']."'";
}else if ($_POST['test']==19){
$sql = "update member set mem_score_post='".$score."' where mem_user='".$_SESSION['MEM_USER']."'";
}
mysql_query($sql);
}
// if ($test==1){
// echo $row_singin['mem_pretest_value'];}
// elseif ($test==2){
// echo $row_singin['mem_score1'];}
// elseif ($test==3){
// echo $row_singin['mem_score2'];}
// elseif ($test==4){
// echo $row_singin['mem_score3'];}
// elseif ($test==5){
// echo $row_singin['mem_score_post'];}
?>
</font></strong>
คะแนน</p>
<p class="style3"><?
if ($_POST['test']==2){
if ($score>=8){echo "สอบผ่านบทที่ 1"; }else{ echo "สอบไม่ผ่าน"; }
}else if ($_POST['test']==3){
if ($score>=8){echo "สอบผ่านบทที่ 2"; }else{ echo "สอบไม่ผ่าน"; }
}else if ($_POST['test']==4){
if ($score>=8){echo "สอบผ่านบทที่ 3"; }else{ echo "สอบไม่ผ่าน"; }
}else if ($_POST['test']==5){
if ($score>=8){echo "สอบผ่านบทที่ 4"; }else{ echo "สอบไม่ผ่าน"; }
}else if ($_POST['test']==6){
if ($score>=8){echo "สอบผ่านบทที่ 5"; }else{ echo "สอบไม่ผ่าน"; }
}else if ($_POST['test']==7){
if ($score>=8){echo "สอบผ่านบทที่ 6"; }else{ echo "สอบไม่ผ่าน"; }
}else if ($_POST['test']==8){
if ($score>=8){echo "สอบผ่านบทที่ 7"; }else{ echo "สอบไม่ผ่าน"; }
}else if ($_POST['test']==9){
if ($score>=8){echo "สอบผ่านบทที่ 8"; }else{ echo "สอบไม่ผ่าน"; }
}else if ($_POST['test']==10){
if ($score>=8){echo "สอบผ่านบทที่ 9"; }else{ echo "สอบไม่ผ่าน"; }
}else if ($_POST['test']==11){
if ($score>=8){echo "สอบผ่านบทที่ 10"; }else{ echo "สอบไม่ผ่าน"; }
}else if ($_POST['test']==12){
if ($score>=8){echo "สอบผ่านบทที่ 11"; }else{ echo "สอบไม่ผ่าน"; }
}else if ($_POST['test']==13){
if ($score>=8){echo "สอบผ่านบทที่ 12"; }else{ echo "สอบไม่ผ่าน"; }
}else if ($_POST['test']==14){
if ($score>=8){echo "สอบผ่านบทที่ 13"; }else{ echo "สอบไม่ผ่าน"; }
}else if ($_POST['test']==15){
if ($score>=8){echo "สอบผ่านบทที่ 14"; }else{ echo "สอบไม่ผ่าน"; }
}else if ($_POST['test']==16){
if ($score>=8){echo "สอบผ่านบทที่ 15"; }else{ echo "สอบไม่ผ่าน"; }
}else if ($_POST['test']==17){
if ($score>=8){echo "สอบผ่านบทที่ 16"; }else{ echo "สอบไม่ผ่าน"; }
}else if ($_POST['test']==18){
if ($score>=8){echo "สอบผ่านบทที่ 17"; }else{ echo "สอบไม่ผ่าน"; }
}else if ($_POST['test']==19){
if ($score>=8){echo "สอบผ่านบทที่ 18"; }else{ echo "สอบไม่ผ่าน"; }
}else if ($_POST['test']==20){
if ($score>=15){echo "จบเกณฑ์"; }else{ echo "สอบไม่ผ่าน"; }
}
?>