当前位置:网站首页>PHP security development 15 user password modification module
PHP security development 15 user password modification module
2022-06-13 04:31:00 【qq_ forty-two million three hundred and seven thousand five hun】
establish users_editor.php
<?php
include_once "head.php";
header("Content-type: text/html; charset=utf-8");
$id = filterstr($_GET['id']);
$result = $conn->query("select * from article where id = '$id'");
$row =$result->fetch_assoc();
$password = md5(filterstr($_POST['password']));
if($_POST['sub']){
echo "update users set password = '$password' where username= '$_SESSION[username]' ";
//echo "update article set title = '$title',content='$content',author='$author',keyword='$keyword',c_time=$c_time,catid=$catid where id='$id'";
$conn->query("update users set password = '$password' where username= '$_SESSION[username] '");
if ($conn->affected_rows > 0) {
redirect(2, 'main.php', ' Edit success ');
} else {
redirect(2, 'users_editor.php', ' Edit failed ');
}
}
//$sql="insert into article (title,content,author,keyword,catid,c_time) value ('$title','$content','$author','$keyword',$cateid,'$c_time')";
?>
<!doctype html>
<html>
<!--/sidebar-->
<div class="main-wrap">
<div class="crumb-wrap">
<div class="crumb-list"><i class="icon-font"></i><a href="/jscss/admin/design/"> home page </a><span class="crumb-step">></span><a class="crumb-name" href="/jscss/admin/design/"> Work management </a><span class="crumb-step">></span><span> Editing works </span></div>
</div>
<div class="result-wrap">
<div class="result-content">
<form action="" method="post" id="myform" name="myform" enctype="multipart/form-data">
<table class="insert-tab" width="100%">
<tbody>
<tr>
<th><i class="require-red">*</i> password :</th>
<td>
<input class="common-text required" id="password" name="password" value="" size="50" type="password">
</td>
<tr>
<th></th>
<td>
<input class="btn btn-primary btn6 mr10" value=" Submit " name ="sub" type="submit">
<input class="btn btn6" onClick="history.go(-1)" value=" return " type="button">
</td>
</tr>
</tbody></table>
</form>
</div>
</div>
</div>
<!--/main-->
</div>
</body>
</html>
head.php
<?php
include_once "init.php";
?>
<!doctype html>
<html>
<head>
<meta charset="UTF-8"/>
<title> Background management </title>
<link rel="stylesheet" type="text/css" href="css/common.css"/>
<link rel="stylesheet" type="text/css" href="css/main.css"/>
</head>
<body>
<div class="topbar-wrap white">
<div class="topbar-inner clearfix">
<div class="topbar-logo-wrap clearfix">
<h1 class="topbar-logo none"><a href="index.html" class="navbar-brand"> Background management </a></h1>
<ul class="navbar-list clearfix">
<li><a class="on" href="main.php"> home page </a></li>
<li><a href="#" target="_blank"> homepage </a></li>
</ul>
</div>
<div class="top-info-wrap">
<ul class="top-info-list clearfix">
<li><a href="#"> Administrators </a></li>
<li><a href="users_editor.php"> Change Password </a></li>
<li><a href="#"> sign out </a></li>
</ul>
</div>
</div>
</div>
<div class="container clearfix">
<div class="sidebar-wrap">
<div class="sidebar-title">
<h1> menu </h1>
</div>
<div class="sidebar-content">
<ul class="sidebar-list">
<li>
<a href="#"><i class="icon-font"></i> Common operations </a>
<ul class="sub-menu">
<li><a href="article_list.php"><i class="icon-font"></i> Blog management </a></li>
<li><a href="cate_list.php"><i class="icon-font"></i> Classification management </a></li>
<li><a href="flink_list.php"><i class="icon-font"></i> link </a></li>
</ul>
</li>
<li>
<a href="system.php"><i class="icon-font"></i> System management </a>
<ul class="sub-menu">
</ul>
</li>
</ul>
</div>
</div>
边栏推荐
- Webpack system learning (VIII) how contenthash can prevent browsers from using cache files
- Advanced Mathematics (Seventh Edition) Tongji University exercises 1-3 personal solutions
- ACM ICPC
- Express framework knowledge - Art template template, cookie, session
- Day45. data analysis practice (1): supermarket operation data analysis
- Analyse du principe de mise en œuvre d'un éditeur de texte open source markdown - to - rich
- Detailed explanation of KOA development process
- Reread the classic: end to end object detection with transformers
- Ladder race
- PAT 1054 The Dominant Color
猜你喜欢
Knife4j aggregation 2.0.9 supports automatic refresh of routing documents
120. triangle minimum path sum - Dynamic Planning
Ladder race
CTFSHOW SQL注入篇(231-253)
VGA display based on de2-115 platform
Redis
The could not find com scwang. smart:refresh-layout-kernel:2.0.3. Required by: project: the app cannot load the third-party package
Principle, composition and functions of sensors of Dajiang UAV flight control system
Day 007: go language string
Real time question answering of single chip microcomputer / embedded system
随机推荐
H5 the blue background color appears when clicking the picture
Principle, composition and functions of sensors of Dajiang UAV flight control system
重读经典:《End-to-End Object Detection with Transformers》
Li Kou brush question 647 Palindrome substring
Collection of wrong questions in soft test -- morning questions in the first half of 2010
Alipay native components (hotel time selection)
[chapter 67 of the flutter problem series] the solution to the problem that the get plug-in cannot jump to the route twice in the dialog pop-up window in flutter
Milliards de données pour déterminer si un élément existe
Uni app dynamic add style dynamic bind background image invalid
【Flutter 问题系列第 67 篇】在 Flutter 中使用 Get 插件在 Dialog 弹窗中不能二次跳转路由问题的解决方案
Ladder race
Introduction and use of ES6
【Flutter 問題系列第 67 篇】在 Flutter 中使用 Get 插件在 Dialog 彈窗中不能二次跳轉路由問題的解决方案
Knife4j aggregation 2.0.9 supports automatic refresh of routing documents
Google Chrome browser reports an error: net:: err_ BLOCKED_ BY_ CLIENT
SQL advanced challenge (1 - 5)
Sword finger offer 56 - I. number of occurrences in the array
php开发14 友情链接模块的编写
Uni app enables pull-up loading and pull-down refresh (pull-down with animation)
MySQL索引