基于php+mysql的期末作業(yè)小項(xiàng)目(學(xué)生信息管理系統(tǒng))
前言
一個(gè)簡(jiǎn)單的php?mysql項(xiàng)目學(xué)生信息管理系統(tǒng),用于廣大學(xué)子完成期末作業(yè)的參考,該系統(tǒng)實(shí)現(xiàn)增、刪、改、查等基本功能。
1、登錄界面

<!doctype html> <html> <head> <meta charset="utf-8"> <title>無(wú)標(biāo)題文檔</title> <link rel="stylesheet" type="text/css" href="login.css" rel="external nofollow" > </head> <body> <div class="login"> <h2 class="BT">Login</h2> <div class="zm"> <form action="function.php?action=login" method="post"> 賬號(hào):<input type="number" name="user"> 密碼:<input type="password" name="password"> <p>沒(méi)有賬號(hào)?點(diǎn)擊<a href="newuser.php" rel="external nofollow" >注冊(cè)</a></p> <div> <input type="submit" value="登錄" class="dl"><input type="reset" value="重置" class="cz"> </div> </form> </div> </div> </body> </html>
當(dāng)輸入密碼點(diǎn)擊登錄后會(huì)彈出“登錄成功”或者“賬號(hào)或密碼有錯(cuò)誤提示”

2、注冊(cè)界面

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>無(wú)標(biāo)題文檔</title>
<link rel="stylesheet" type="text/css" href="newuser.css" rel="external nofollow" >
</head>
<body>
<div class="l">
<img src="微信圖片_20220530195333333png.png" width="100px" height="100px">
<h3>學(xué)生成績(jī)管理系統(tǒng)</h3>
</div>
<div style=" height: 130px; " > <a href="login.php" rel="external nofollow" class="ll" ></a></div>
<div class="zc" style="padding-left: 30px;">
<h2 align="center" style="color:#D6CFCF;">DeleteStudent</h2>
<form method="post" action="">
賬 號(hào):<input type="number" class="id" name="id">
密 碼:<input type="password" class="password" name="password">
確認(rèn)密碼:<input type="password" class="repassword" name="repassword">
<input type="submit" class="tj" value="注冊(cè)" name="tj">
</form>
</div>
<?php
include("connection.php");
if(isset($_POST["tj"])){
$id=$_POST["id"];
$password=$_POST["password"];
$repassword=$_POST["repassword"];
if($password==$repassword){
connection();
$sql="insert into user(userid,password)values('".$id."','".$password."')";
$result=mysql_query($sql);
echo "<script>alert('注冊(cè)成功!');location='login.php'</script>";
}else{
echo "<script>alert('密碼不一致');location='newuser.php'</script>";
}
}
?>
</body>
</html>當(dāng)輸入密碼點(diǎn)擊注冊(cè)后會(huì)彈出“注冊(cè)成功”或者“密碼不一致”或者賬號(hào)密碼不為空提示·

點(diǎn)擊圖上的小房子可以返回登錄界面
3、主界面

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>無(wú)標(biāo)題文檔</title>
<link rel="stylesheet" type="text/css" href="main.css">
</head>
<body>
<div class="l">
<img src="微信圖片_20220530195333333png.png" width="100px" height="100px" >
<h3>學(xué)生信息管理系統(tǒng)</h3>
</div>
<div style=" height: 130px; "> <a href="login.php" class="ll" ></a></div>
<h3 style="padding-left: 48%;padding-top: 0px; color: aquamarine; height: 30px;line-height: 29px;"><a href="table.php" style="text-decoration: none; color: aqua;" class="a3">學(xué)生表</a></h3>
<div class="nav">
<a href="select.php" class="bg1">查詢學(xué)生信息</a>
<a href="update.php" class="bg2">修改學(xué)生信息</a>
<a href="delete.php"class="bg3" >刪除學(xué)生信息</a>
<a href="adding.php"class="bg4">添加學(xué)生信息</a>
</div>
</body>
</html>4、學(xué)生表界面
點(diǎn)擊主界面上的“學(xué)生表”可以進(jìn)入學(xué)生表界面

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>無(wú)標(biāo)題文檔</title>
<link rel="stylesheet" type="text/css" href="table.css">
</head>
<body>
<div class="l" ">
<img src="微信圖片_20220530195333333png.png" width="100px" height="100px" >
<h3>學(xué)生信息管理系統(tǒng)</h3>
</div>
<div style=" height: 130px; "> <a href="main.php" class="ll" ></a></div>
<h2 align="center" >學(xué)生表</h2><br>
<table align="center" border="1" cellpadding="0 " cellspacing="0" width="700" style="margin: 0px auto;">
<tr align="center" height="30px">
<td>姓名</td>
<td>性別</td>
<td>年齡</td>
<td>學(xué)號(hào)</td>
<td>聯(lián)系方式</td>
</tr>
<?PHP
include("connection.php");
connection();
$sql="select * from studenttable ";
mysql_query("SET CHARACTER SET utf-8");
$result=mysql_query($sql);
while($row=mysql_fetch_assoc($result)){
echo("<tr align='center' height='30px'>");
echo("<td>".$row['Name']."</td>");
echo("<td>".$row['Sex']."</td>");
echo("<td>{$row['Age']}</td>");
echo("<td>{$row['Sno']}</td>");
echo("<td>{$row['TelphoneNumber']}</td>");
echo("</tr>");
}
?>
</table>
</body>
</html>點(diǎn)擊圖上的小房子可以返回主界面
5 、查詢學(xué)生界面

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>無(wú)標(biāo)題文檔</title>
<link rel="stylesheet" type="text/css" href="select.css">
</head>
<body>
<div class="l">
<img src="微信圖片_20220530195333333png.png" width="100px" height="100px">
<h3>學(xué)生成績(jī)管理系統(tǒng)</h3>
</div>
<div style=" height: 130px; "> <a href="main.php" class="ll" ></a></div>
<div class="zc" style="padding-left: 30px;">
<h2 align="center" style="color:#D6CFCF;">SelectStudent</h2><br>
<form method="post" action="">
學(xué) 號(hào):<input type="number" class="name" name="sno"> <br><br>
<input type="submit" class="tj" value="查詢" name="cx" >
</form>
</div>
<table align="center" border="1" cellpadding="0 " cellspacing="0" width="700" style="margin: 0px auto;">
<tr align="center" height="30px">
<td>姓名</td>
<td>性別</td>
<td>年齡</td>
<td>學(xué)號(hào)</td>
<td>聯(lián)系方式</td>
</tr>
<?PHP
include("connection.php");
connection();
if(isset($_POST["cx"])){
$Sno=$_POST["sno"];
$sql=$sql="select * from studenttable where Sno='".$Sno."'";
mysql_query("SET CHARACTER SET utf-8");
$result=mysql_query($sql);
if(mysql_num_rows($result)>0)
{
echo "<script>alert('查詢成功!');</script>";
}else{
echo "<script>alert('學(xué)號(hào)不存在!');</script>";
}
while($row=mysql_fetch_assoc($result)){
echo("<tr align='center' height='30px'>");
echo("<td>".$row['Name']."</td>");
echo("<td>".$row['Sex']."</td>");
echo("<td>{$row['Age']}</td>");
echo("<td>{$row['Sno']}</td>");
echo("<td>{$row['TelphoneNumber']}</td>");
echo("</tr>");}
}
?>
</table>
</body>
</html>點(diǎn)擊圖上的小房子可以返回主界面
6、修改學(xué)生信息界面

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>無(wú)標(biāo)題文檔</title>
<link rel="stylesheet" type="text/css" href="update.css">
</head>
<body>
<div class="l">
<img src="微信圖片_20220530195333333png.png" width="100px" height="100px">
<h3>學(xué)生成績(jī)管理系統(tǒng)</h3>
</div>
<div style=" height: 130px; " > <a href="main.php" class="ll" ></a></div>
<div class="zc" style="padding-left: 30px;">
<h2 align="center" style="color:#D6CFCF;">UpdateStudent</h2><br>
<form method="post" action="">
姓 名:<input type="text" class="name" name="name"> <br><br>學(xué) 號(hào):<input type="number" class="sno" name="sno"><br><br>
性 別:<input type="radio" class="sex" name="sex" value="男" checked>男<input type="radio" class="sex" name="sex" value="女">女 <br><br>
年 齡:<input type="number" class="age" name="age"><br><br>
聯(lián)系方式: <input type="tel" class="telphone" name="telphone"><br>
<input type="submit" class="tj" value="修改" name="tj">
</form>
</div>
<?php
include("connection.php");
if(isset($_POST["tj"])){
$Name=$_POST["name"];
$Sno=$_POST["sno"];
connection();
$sql="select * from studenttable where Name='".$Name."' and Sno='".$Sno."'";
$result=mysql_query($sql);
if(mysql_num_rows($result)>0){
$Name=$_POST["name"];
$Sno=$_POST["sno"];
$Sex=$_POST["sex"];
$Age=$_POST["age"];
$tel=$_POST["telphone"];
$sql="update studenttable set Sex='".$Sex."',Age='".$Age."',TelphoneNumber='".$tel."'where Sno='".$Sno."' and Name='".$Name."'";
mysql_query($sql)or die(mysql_error());
echo("<script>alert('修改成功');window.location.href='table.php';</script>");
}
else{
echo("<script>alert('學(xué)號(hào)或姓名不存在');</script>");
}
}
?>
</body>
</html>點(diǎn)擊圖上的小房子可以返回主界面
7、刪除學(xué)生信息界面

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>無(wú)標(biāo)題文檔</title>
<link rel="stylesheet" type="text/css" href="delete.css">
</head>
<body>
<div class="l">
<img src="微信圖片_20220530195333333png.png" width="100px" height="100px">
<h3>學(xué)生成績(jī)管理系統(tǒng)</h3>
</div>
<div style=" height: 130px; " > <a href="main.php" class="ll" ></a></div>
<div class="zc" style="padding-left: 30px;">
<h2 align="center" style="color:#D6CFCF;">DeleteStudent</h2><br>
<form method="post" action="">
姓 名:<input type="text" class="name" name="name"> <br><br>學(xué) 號(hào):<input type="number" class="sno" name="sno"><br><br>
<input type="submit" class="tj" value="刪除" name="tj">
</form>
</div>
<?php
include("connection.php");
if(isset($_POST["tj"])){
$Name=$_POST["name"];
$Sno=$_POST["sno"];
connection();
$sql="select * from studenttable where Name='".$Name."' and Sno='".$Sno."'";
$result=mysql_query($sql);
if(mysql_num_rows($result)>0){
$Name=$_POST["name"];
$Sno=$_POST["sno"];
$sql="delete from studenttable where Sno='".$Sno."' and Name='".$Name."'";
mysql_query($sql)or die(mysql_error());
echo("<script>alert('刪除成功');window.location.href='table.php';</script>");
}
else{
echo("<script>alert('學(xué)號(hào)或姓名不存在');</script>");
}
}
?>
</body>
</html>點(diǎn)擊圖上的小房子可以返回主界面
8、添加學(xué)生信息界面

點(diǎn)擊圖上的小房子可以返回主界面
9、后臺(tái)數(shù)據(jù)庫(kù)


總結(jié)
到此這篇關(guān)于基于php+mysql的期末作業(yè)小項(xiàng)目的文章就介紹到這了,更多相關(guān)php mysql學(xué)生信息管理系統(tǒng)內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
laravel migrate初學(xué)常見(jiàn)錯(cuò)誤的解決方法
之前給大家介紹了關(guān)于laravel migrate入門的基礎(chǔ),下面這篇文章主要給大家介紹了關(guān)于laravel migrate初學(xué)時(shí)常見(jiàn)錯(cuò)誤的解決方法,文中通過(guò)示例代碼介紹的非常詳細(xì),需要的朋友可以參考借鑒,下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧。2017-10-10
談?wù)凱HP中substr和substring的正確用法及相關(guān)參數(shù)的介紹
這篇文章主要介紹了PHP中substr和substring的正確用法及相關(guān)參數(shù)介紹的相關(guān)資料,需要的朋友可以參考下2015-12-12
ThinkPHP3.1新特性之對(duì)Ajax的支持更加完善
這篇文章主要介紹了ThinkPHP3.1對(duì)Ajax的支持,需要的朋友可以參考下2014-06-06
laravel技巧之查詢構(gòu)造器Query Builder疊加鏈?zhǔn)秸{(diào)用的方法
這篇文章主要給大家介紹了關(guān)于laravel技巧之查詢構(gòu)造器Query Builder疊加鏈?zhǔn)秸{(diào)用的相關(guān)資料,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友下面來(lái)一起看看吧。2017-12-12
php驗(yàn)證碼實(shí)現(xiàn)代碼(3種)
這篇文章主要介紹了php驗(yàn)證碼實(shí)現(xiàn)代碼,純數(shù)字驗(yàn)證碼,數(shù)字加英文驗(yàn)證碼還有一種漢字驗(yàn)證碼,感興趣的小伙伴們可以參考一下2015-09-09
Symfony2框架學(xué)習(xí)筆記之HTTP Cache用法詳解
這篇文章主要介紹了Symfony2框架HTTP Cache用法,結(jié)合實(shí)例形式分析了Symfony框架HTTP緩存的相關(guān)使用技巧,需要的朋友可以參考下2016-03-03

