当前位置:网站首页>(PHP graduation project) based on PHP student daily behavior management system access
(PHP graduation project) based on PHP student daily behavior management system access
2022-07-28 06:18:00 【BiShe source code library】
be based on php Student daily behavior management system
The student daily behavior management system is based on php Programming languages and mysql Database development BS Architecture system , The system is mainly divided into students , Teachers' , Administrator has three roles ; The main function of students is personal information , Comprehensive evaluation of , Apply for leave , Class daily , Lesson schedule , achievement , View certificate information ; The main function of teachers is to manage students' grades , Information , Lesson schedule , certificate , Ask for leave , Health duty , Operation assistance and other functions ; Administrators can manage students , Teachers' , Monitoring information management . This system has complete functions , Code comments are clear , For a php Graduation project reference and learning .
One . Technical environment
php edition : 5.3 above
development tool : notepad++,sublime,phpstorm All right
database : mysql
The server : apache
Integrated environment : phpstudy
The front frame :bootstrap
Detailed technical :HTML+CSS+JS+PHP+MYSQL+PhpStudy
Two . Project documents

3、 ... and . system function

Four . Code example
<?php
// +----------------------------------------------------------------------
// | Login function
// | Design thinking , Get the account and password entered by the user , Verify the data entered by the user , Verification passed ,
// | Save the login information of the user to the database , And generate cookie, Prompt the user to log in successfully
// +----------------------------------------------------------------------
// Reference commonly used functions
require_once('../../../config/config.php');
// Get the login username
$name = $_POST['name'];
// Get the user's login password
$password = $_POST['password'];
// Get the login role
$role = $_POST['role'];
// Judge whether the user name entered by the user is empty
if (!$name) {
// If it is empty , Return to the prompt message
ajaxReturn(0, ' Please enter a user name ');
}
// Judge whether the password entered by the user is empty
if (!$password) {
ajaxReturn(0,' Please input a password ');
}
//sql sentence
$sql = "SELECT * FROM users WHERE name='$name' AND password='$password'";
// Query database user records ,fetchOne Function in mysql.php in
$result = fetchOne($link,$sql);
// If this user is not queried
if(!$result) {
ajaxReturn(0,' I'm sorry , Wrong login and password !');
}else {
// Save the user's session
$user = array(
'id'=>$result['id'],
'name'=>$result['name'],
'avatar' =>$result['avatar'],
'role'=>$result['role']
);
// If the user logs in
if($role == 1) {
if($result['role'] == 1){
// Set up session, Failure time 1 Hours
$_SESSION["user"]=$user;
ajaxReturn(1,' congratulations , Login successful !');
}else{
ajaxReturn(0,' I'm sorry , You are not a user !');
}
}
// If you are an administrator, log in
if($role == 2 ) {
// Determine whether you are an administrator
if($result['is_admin'] == 1) {
// Set up session, Failure time 1 Hours
$_SESSION["admin"]=$user;
// Prompt for successful login
ajaxReturn(2,' congratulations , Login successful !');
}else{
// If it's not the Administrator , Give tips
ajaxReturn(0,' I'm sorry , You're not the administrator !');
}
}
}
<?php
// +----------------------------------------------------------------------
// | Registration function
// | Design thinking , First, judge whether the data entered by the user is correct , In determining whether the user's email has a note
// | too , Meet the conditions , Registered successfully ,ajaxReturn Function in include.php in
// +----------------------------------------------------------------------
// Reference commonly used functions
require_once('../../../config/config.php');
// Get the data sent by the front desk
$name = $_POST['name'];// Get username
$password = $_POST['password'];// Get password
$email = $_POST['email'];// Get games
$password_o = $_POST['password_o'];// Get duplicate password
// Judge user name
if(!$name) {
ajaxReturn(0,' Incorrect user name format , English plus numbers !');
}
// Determine whether the password is entered correctly
if(!is_password($password)) {
ajaxReturn(0,' The password format is incorrect , No less than 6 position !');
}
// Determine whether the mailbox is entered correctly
if(!is_email($email)) {
ajaxReturn(0,' The email format is incorrect !');
}
// Judge whether the two password entries are consistent
if($password != $password_o) {
ajaxReturn(0,' The two passwords are not the same !');
}
// Query whether the database has registered this mailbox
$sql = "SELECT * FROM users WHERE email='$email'";
$result1 = fetchAll($link,$sql);
if($result1) {
ajaxReturn(0,' I'm sorry , This email has been registered !');
}
$data = array(
'name'=>$name,
'password'=>$password,
'email'=> $email,
'addtime'=>date('Y-m-d H:i:s')
);
// Save the user's registration information to users surface , Among them $link stay include.php in
$result2 = insert($link,$data,'users');
// If the registration succeeds or fails , Return to the prompt
if(!$result2) {
ajaxReturn(0,' Registration failed !');
}else{
ajaxReturn(1,' Congratulations on your successful registration ');
}
5、 ... and . Project screenshots






















边栏推荐
- 三极管设计,理解饱和,线性区域和截止区
- Why is the kotlin language not popular now? What's your opinion?
- TensorFlow2.1基本概念与常见函数
- Nanjing University of Posts and Telecommunications CTF topic writeup (I) including topic address
- 机器学习之聚类
- 物联网互操作系统:分类、标准与未来发展方向综述
- Tf.keras build neural network function expansion
- 深度学习(一):走进机器学习与深度学习理论部分
- 生活随机-1
- Reinforcement learning - proximal policy optimization algorithms
猜你喜欢

Overview of unconstrained low resolution face recognition II: heterogeneous low resolution face recognition methods

Addition and multiplication calculation of GF (2^8)

ESXi on Arm 10/22 更新

使用PowerCli来创建自定义ESXi ISO镜像

关于隔离电源断电瞬间MOSFET损坏问题分析

UNL class diagram

1、 Amd - openvino environment configuration

Reinforcement learning - Multi-Agent Reinforcement Learning

深度学习数据窃取攻击在数据沙箱模式下的威胁分析与防御方法研究阅读心得

Deep learning (self supervised: Moco V3): An Empirical Study of training self supervised vision transformers
随机推荐
Deep learning (self supervision: simple Siam) -- Exploring simple Siamese representation learning
RS232 RS485 RS422 通信 学习及备忘笔记
Reinforcement learning - Multi-Agent Reinforcement Learning
A comparative study of backdoor attack and counter sample attack
Summary of common WAF interception pages
CalendarExtender控件的中文显示问题
Reinforcement learning - incomplete observation problem, MCTs
三、OpenVINO实战:图像分类
Protecting Against DNN Model Stealing Attacks 论文阅读心得
Tensorflow2.1 basic concepts and common functions
Paper reading notes of field low resolution face recognition based on selective knowledge extraction
Deep learning (II) into machine learning and deep learning programming
Cluster operation management system, to answer questions about the process
四、模型优化器与推理引擎
基于tensorflow搭建神经网络
Interpreting the knowledge in a neural network
Deep learning (incremental learning) -- iccv2021:ss-il: separated softmax for incremental learning
D2SC-GAN:基于双深浅通道生成对抗网络的课堂场景低分辨率人脸识别
Neural network optimization
ESXi 7.0 Update 1c中加入的systemMediaSize启动选项