title: Notice: Undefined offset: 4 php
body: <p>i'm getting this error in my php scripting.. i dont know what the error is.. its on the first line. </p>
  
  <pre><code>if( $row_Recordset1['stud_mac'] ==$lines[$i]){ // error in this line
              $jumpa="Ya";
  
              $tarikhHariIni=date("Y-n-j",time()+ 3600*8);
              $masaHariIni=date("Y-n-j H:i:s ",time()+ 3600*8);
              $attID= $row_Recordset1['stud_id']."-".$tarikhHariIni;
              mysql_select_db($database_att, $att);
              $queryAttendRekod = "SELECT * FROM mobats_attendance where stud_id = '$attID'";
              $AttendRekod = mysql_query($queryAttendRekod, $att) or die(mysql_error());
              $row_queryAttendRekod = mysql_fetch_assoc($AttendRekod);
              //echo $row_queryAttendRekod['attID']."&lt;br&gt;";
              if($row_queryAttendRekod['att_id']=="")
               { 
               //echo $masaHariIni;
                 $insertData="Insert into mobats_attendance (att_date,stud_id,att_id) values ('$masaHariIni','$row_Recordset1[stud_id]','$attID')";
                 $Result1 = mysql_query($insertData, $att) or die(mysql_error());
                 echo "Congratulation! You've manage to attend the class. Thank You! &lt;br&gt; Today is ".change2day($tarikhHariIni)." ".change2dmy($tarikhHariIni);
                 echo "&lt;br&gt;";
                 echo $row_Recordset1['stud_name']." you have attend class on &lt;br&gt; ".substr($masaHariIni,10,19); ?&gt; 
                 &lt;?php
               }
  
      $masuk= $masaHariIni;
      if($masuk=='') {
      $masuk=$row_queryAttendRekod['punchIn']; }
  
           }
      }
  </code></pre>