一个用于考勤系统的php页面

时间:2016-11-03 11:56:00

标签: php html mysqli

  <?php 

    $db=new mysqli("localhost","root","","internet") or die("unable to                             
      connect");




    if($db)
     {
       echo "great work!!!!";
           }




     $report=mysqli_query($db,"SELECT id, name, rollno FROM students" );
   ?>



    <html>
     <head>
<title>attendance</title>
 </head>
<body>
 <table>

   <form action="addinsert.php" method="post"> 
    <table id = "attendance" width="567" border="1 bold"> 
    <tr> 
      <th width="83" scope="col">ID</th> 
      <th width="83" scope="col">Student Name</th> 
      <th width="55" scope="col">ENROLLOMENT_NO</th> 
      <th width="51" scope="col">Attendance</th> 
    </tr>



    <?php   
  while($row=mysqli_fetch_row($report,MYSQLI_BOTH)) 
  {  
   echo "<tr>";
   echo "<td>" . "<input type=number value=" .$row['ID']." </td>"; 
   echo "<td>" . "<input type=text value=" .$row['student_name']." </td>";
   echo "<td>" . "<input type=text value=" .$row['enro.no']." </td>"; 

   echo "<td>" . "<input type=radio name=att value='present'>";?>P
   <?php echo "<input type=radio name=att value='absent'>";?>A 
echo "</td>";
}
  echo "</tr>"; 

?>    



   </table>
     <input type="submit" value="submit">
    </form>
   </body>

</html>

以上代码是考勤管理系统的小型php页面。   执行上述代码后,显示以下错误:     ! )解析错误:语法错误,第48行C:\ wamp64 \ www \ internet \ index.php中的文件意外结束

所以,如果有任何建议,请回答。

0 个答案:

没有答案