Code: Select all
if ($in1!='' or $jur1!='' or $thn1!='')
{
CekKolom3($in1,$jur1,$thn1,$inf3); // the code for the function is on another page but it's worked
$A1=true;
}
switch ($A1) {
case 1:
if($in2!='' and $jur2 !="" and $thn2 !="") {
$A2=true; }
elseif ($in2!='' or $jur2 !="" or $thn2 !="") { exit ("the second Data is not Complete yet"); }
break;
case 0:
if($in2!='' or $jur2 !="" or $thn2 !="")
{ exit ("Data pertama belum terisi");}
break; }
switch ($A2) { //this variabel taking from the above switch.
case 1:
if($in3!='' and $jur3 !="" and $thn3 !="") {
$A3=true; }
elseif ($in3!='' or $jur3 !="" or $thn3 !="") { exit ("the second Data is not Complete yet"); }
break;
case 0:
if($in3!='' or $jur3 !="" or $thn3 !="")
{ exit ("Data Kedua belum terisi");}
break; }
thx for the reply and hoping this will help other person who got stuck on OOP implementation....
Thank for reply one again....
this code can be run in prosedural style
Life Isn't easy as it Thought but some help out there never gone.