PHP develops simple book background management system book statistics complete code
Introduce the database file config.php file
and the ly_check.php file that determines whether the administrator is logged in
Call the css.css style in the HTML page
Place the book The statistics page is named count.php file.
<?php include("config.php"); require_once('ly_check.php'); ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>图书统计</title> <link rel="stylesheet" href="css.css" type="text/css"> </head> <body> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC" class="table"> <tr> <td height="27" colspan="2" align="left" bgcolor="#FFFFFF" class="bg_tr"> 后台管理 >> 图书统计</td> </tr> <tr> <td align="center" bgcolor="#FFFFFF" height="27">图书类别</td> <td align="center" bgcolor="#FFFFFF">库内图书</td> </tr> <?php $sql="select type, count(*) from yx_books group by type"; $val=mysqli_query($link,$sql); while($arr=mysqli_fetch_row($val)){ echo "<tr height='30'>"; echo "<td align='center' bgcolor='#FFFFFF'>".$arr[0]."</td>"; echo "<td align='center' bgcolor='#FFFFFF'>本类目共有:".$arr[1]." 种</td>"; echo "</tr>"; } ?> </table> </body> </html>
In this way, our complete simple book backend management system is basically completed. We hope that completing this system
will be of some help to everyone's PHP learning.
Note: The code in this tutorial is only for friends to learn and refer to, and cannot be used for projects!