php+mysql+apache实现登录注册系统
Php+mysql写网页注册登录系统
1、搭建msyql+php+apache的网站环境
(1) 在云服务器上搭建服务器,推荐使用宝塔集成
(2) 在本地windows搭建,推荐自己采用分开安装,这样可以更好的配置自己的需求
2、编写前端登录注册页面
(1) 采用form表单编写登录注册页面
(2) 也可以form表单配合ajax实现表单提交
代码演示:
login_register.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>登录注册</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<!--背景-->
<div class="wel" id="background-3"></div>
<!--左右两边云-->
<div class="wel" id="box">
<div class="box-1 lefp"></div>
<div class="box-1">
<div class="righp"></div>
</div>
</div>
<!--荧光点点-->
<div class="wel" id="git"></div>
<!--登录注册表-->
<div class="wel" id="from">
<div class="box-2 le-1">
<form action="php/login.php" method="POST">
<div class="flrg">
<h3>登录</h3>
<div class="a">
<!--<label>账号:</label>-->
<input type="text" class="in-1" name="username" placeholder="请输入用户名">
</div>
<div class="a">
<!--<label>密码:</label>-->
<input type="password" class="in-1" name="password" placeholder="请输入密码">
</div>
<div class="a">
<input type="submit" name="submit" value="登录" id="login_sub">
<!-- <button type="button">登录</button> -->
</div>
<div class="a">
<div class="hr"></div>
</div>
<div class="a">
<a href="#">忘记密码?</a>
</div>
</div>
</form>
</div>
<div class="box-2 le-2">
<form action="php/register.php" method="POST">
<div class="flrg-1">
<h3>注册</h3>
<div class="a">
<input type="text" class="in-1" name="username" placeholder="您的用户名">
</div>
<div class="a">
<input type="password" class="in-1" name="password" placeholder="输入密码">
</div>
<div class="a">
<input type="password" class="in-1" name="pwd" placeholder="再次确认密码">
</div>
<div class="a">
<input type="text" class="in-1" name="phone" placeholder="输入手机号码">
</div>
<div class="a">
<input type="email" class="in-1" name="email" placeholder="输入邮箱地址">
</div>
<div class="a">
<input type="submit" name="submit" value="注册" id="register_sub">
<!-- <button type="button">注册</button> -->
</div>
</div>
</form>
</div>
</div>
</body>
</html>
Style.css:
/*鬼泣*/
.wel{
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
#background-3{
background: url("../imgs/preview-1.jpg") no-repeat;
background-size: cover;
height: 900px;
}
.box-1{
width: 50%;
height: 900px;
float: left;
overflow: hidden;
}
.box-2{
width: 50%;
position: relative;
float: left;
overflow: hidden;
top: 25%;
}
.lefp{
background: url("../img/1baa42452320f5d4eb2f5e1f22cacebb.png");
-webkit-animation: mylefp 10s;
-o-animation: mylefp 10s;
animation: mylefp 10s;
position: relative;
float: left;
opacity: 0;
background-position: 100% 0;
}
.righp{
background: url("../img/1baa42452320f5d4eb2f5e1f22cacebb.png") ;
-webkit-animation: myrighp 10s;
-o-animation: myrighp 10s;
animation: myrighp 10s;
position: relative;
float: right;
opacity: 0;
width: 100%;
height: 100%;
overflow: hidden;
}
#git{
background: url("../img/midground.png");
-webkit-animation: mygit 100s linear infinite;
-o-animation: mygit 100s linear infinite;
animation: mygit 100s linear infinite;
}
/*左边云*/
@keyframes mylefp {
0%{
left: 0;
opacity: 1;
}
100%{
left: -60%;
opacity: 0;
}
}
@-o-keyframes mylefp {
0%{
left: 0;
opacity: 1;
}
100%{
left: -60%;
opacity: 0;
}
}
@-moz-keyframes mylefp {
0%{
left: 0;
opacity: 1;
}
100%{
left: -60%;
opacity: 0;
}
}
@-ms-keyframes mylefp {
0%{
left: 0;
opacity: 1;
}
100%{
left: -60%;
opacity: 0;
}
}
@-webkit-keyframes mylefp {
0%{
left: 0;
opacity: 1;
}
100%{
left: -60%;
opacity: 0;
}
}
/*右边云*/
@keyframes myrighp {
0%{
right: 0;
opacity: 1;
}
100%{
right: -120%;
opacity: 0;
}
}
@-webkit-keyframes myrighp {
0%{
right: 0;
opacity: 1;
}
100%{
right: -120%;
opacity: 0;
}
}
@-ms-keyframes myrighp {
0%{
right: 0;
opacity: 1;
}
100%{
right: -120%;
opacity: 0;
}
}
@-moz-keyframes myrighp {
0%{
right: 0;
opacity: 1;
}
100%{
right: -120%;
opacity: 0;
}
}
@-o-keyframes myrighp {
0%{
right: 0;
opacity: 1;
}
100%{
right: -120%;
opacity: 0;
}
}
/*荧光点点*/
@keyframes mygit {
0%{
background-position: 0 0;
/*transform: translateY(0px);*/
}
100%{
background-position: 0 -600%;
}
}
@-o-keyframes mygit {
0%{
background-position: 0 0;
/*transform: translateY(0px);*/
}
100%{
background-position: 0 -600%;
}
}
@-moz-keyframes mygit {
0%{
background-position: 0 0;
/*transform: translateY(0px);*/
}
100%{
background-position: 0 -600%;
}
}
@-ms-keyframes mygit {
0%{
background-position: 0 0;
/*transform: translateY(0px);*/
}
100%{
background-position: 0 -600%;
}
}
@-webkit-keyframes mygit {
0%{
background-position: 0 0;
/*transform: translateY(0px);*/
}
100%{
background-position: 0 -600%;
}
}
.le-1{
position: relative;
-webkit-animation: myflrg 10s;
-o-animation: myflrg 10s;
animation: myflrg 6s;
}
.le-2{
overflow: hidden;
height: 73%;
}
.flrg{
float: right;
width: 300px;
background: rgba(255,255,255,.6);
text-align: center;
padding-bottom: 40px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.a{
margin: auto;
}
.flrg>.a,.flrg-1>.a{
padding: 10px;
}
.flrg>.a>.in-1,.flrg-1>.a>.in-1{
outline: none;
opacity: 0.6;
width: 238px;
height: 33px;
border: none;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
font-size: 16px;
color: black;
padding-left: 15px;
}
.in-1:focus{
-webkit-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;
-moz-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;
box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;
-webkit-animation: myin-1 10s linear infinite;
-o-animation: myin-1 10s linear infinite;
animation: myin-1 10s linear infinite;
}
.flrg>.a>button,.flrg-1>.a>button{
width: 91%;
padding: 10px;
border: none;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
cursor: pointer;
-webkit-box-shadow: 0 0 19px rgba(0, 0, 0, .1);
-moz-box-shadow: 0 0 19px rgba(0, 0, 0, .1);
box-shadow: 0 0 19px rgba(0, 0, 0, .1);
background: rgba(6,127,228,0.71);
color: white;
font-weight: bold;
letter-spacing: 12px;
text-align: center;
outline: none;
-webkit-transition: all 2s;
-moz-transition: all 2s;
-ms-transition: all 2s;
-o-transition: all 2s;
transition: all 2s;
}
.flrg>.a>button:hover,.flrg-1>.a>button:hover{
-webkit-box-shadow:0 15px 30px 0 rgba(255,255,255,.15) inset, 0 2px 7px 0 rgba(0,0,0,.2);
-moz-box-shadow:0 15px 30px 0 rgba(255,255,255,.15) inset, 0 2px 7px 0 rgba(0,0,0,.2);
box-shadow:0 15px 30px 0 rgba(255,255,255,.15) inset, 0 2px 7px 0 rgba(0,0,0,.2);
}
.hr{
width: 91%;
height: 2px;
background: rgba(255,255,255,0.6);
margin: auto;
}
.flrg>.a>a{
text-decoration: none;
font-weight: bold;
color: #545454;
}
.flrg-1{
float: left;
width: 300px;
background: rgba(255,255,255,.6);
text-align: center;
padding-bottom: 40px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
position: absolute;
-webkit-animation: myflrg-2 10s;
-o-animation: myflrg-2 10s;
animation: myflrg-2 6s;
overflow: hidden;
}
/*登录*/
@keyframes myflrg {
0%{
top: -300%;
}
100%{
top: 25%;
}
}
@-webkit-keyframes myflrg {
0%{
top: -300%;
}
100%{
top: 25%;
}
}
@-ms-keyframes myflrg {
0%{
top: -300%;
}
100%{
top: 25%;
}
}
@-moz-keyframes myflrg {
0%{
top: -300%;
}
100%{
top: 25%;
}
}
@-o-keyframes myflrg {
0%{
top: -300%;
}
100%{
top: 25%;
}
}
/*注册*/
@keyframes myflrg-2 {
0%{
top: 300%;
}
100%{
top: 0;
}
}
@-o-keyframes myflrg-2 {
0%{
top: 300%;
}
100%{
top: 0;
}
}
@-moz-keyframes myflrg-2 {
0%{
top: 300%;
}
100%{
top: 0;
}
}
@-ms-keyframes myflrg-2 {
0%{
top: 300%;
}
100%{
top: 0;
}
}
@-webkit-keyframes myflrg-2 {
0%{
top: 300%;
}
100%{
top: 0;
}
}
/*input呼吸框*/
@keyframes myin-1 {
0%{
-webkit-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;
-moz-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;
box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;
}
50%{
-webkit-box-shadow: 0 0 33px #ff1000 inset, 0 0 18px #ff0300;
-moz-box-shadow: 0 0 33px #ff1000 inset, 0 0 18px #ff0300;
box-shadow: 0 0 33px #ff1000 inset, 0 0 18px #ff0300;
}
100%{
-webkit-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;
-moz-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;
box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;
}
}
@-webkit-keyframes myin-1 {
0%{
-webkit-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;
-moz-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;
box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;
}
50%{
-webkit-box-shadow: 0 0 33px #ff1000 inset, 0 0 18px #ff0300;
-moz-box-shadow: 0 0 33px #ff1000 inset, 0 0 18px #ff0300;
box-shadow: 0 0 33px #ff1000 inset, 0 0 18px #ff0300;
}
100%{
-webkit-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;
-moz-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;
box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;
}
}
@-ms-keyframes myin-1 {
0%{
-webkit-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;
-moz-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;
box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;
}
50%{
-webkit-box-shadow: 0 0 33px #ff1000 inset, 0 0 18px #ff0300;
-moz-box-shadow: 0 0 33px #ff1000 inset, 0 0 18px #ff0300;
box-shadow: 0 0 33px #ff1000 inset, 0 0 18px #ff0300;
}
100%{
-webkit-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;
-moz-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;
box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;
}
}
@-moz-keyframes myin-1 {
0%{
-webkit-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;
-moz-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;
box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;
}
50%{
-webkit-box-shadow: 0 0 33px #ff1000 inset, 0 0 18px #ff0300;
-moz-box-shadow: 0 0 33px #ff1000 inset, 0 0 18px #ff0300;
box-shadow: 0 0 33px #ff1000 inset, 0 0 18px #ff0300;
}
100%{
-webkit-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;
-moz-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;
box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;
}
}
@-o-keyframes myin-1 {
0%{
-webkit-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;
-moz-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;
box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;
}
50%{
-webkit-box-shadow: 0 0 33px #ff1000 inset, 0 0 18px #ff0300;
-moz-box-shadow: 0 0 33px #ff1000 inset, 0 0 18px #ff0300;
box-shadow: 0 0 33px #ff1000 inset, 0 0 18px #ff0300;
}
100%{
-webkit-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;
-moz-box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;
box-shadow: 0 0 33px #1b00ff inset, 0 0 18px #1b00ff;
}
}
#login_sub{
width: 91%;
padding: 10px;
border: none;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
cursor: pointer;
-webkit-box-shadow: 0 0 19px rgba(0, 0, 0, .1);
-moz-box-shadow: 0 0 19px rgba(0, 0, 0, .1);
box-shadow: 0 0 19px rgba(0, 0, 0, .1);
background: rgba(6,127,228,0.71);
color: white;
font-weight: bold;
letter-spacing: 12px;
text-align: center;
outline: none;
-webkit-transition: all 2s;
-moz-transition: all 2s;
-ms-transition: all 2s;
-o-transition: all 2s;
transition: all 2s;
}
#register_sub{
width: 91%;
padding: 10px;
border: none;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
cursor: pointer;
-webkit-box-shadow: 0 0 19px rgba(0, 0, 0, .1);
-moz-box-shadow: 0 0 19px rgba(0, 0, 0, .1);
box-shadow: 0 0 19px rgba(0, 0, 0, .1);
background: rgba(6,127,228,0.71);
color: white;
font-weight: bold;
letter-spacing: 12px;
text-align: center;
outline: none;
-webkit-transition: all 2s;
-moz-transition: all 2s;
-ms-transition: all 2s;
-o-transition: all 2s;
transition: all 2s;
}
编写注册成功返回页面return_register.html
3、数据库操作
(1) 创建数据库
(2) 创建数据表
(3) 创建字段id 、username、password、email、phone等
4、编写php后台
(1) 连接数据库;
conn.php
<?php
header("Content-Type:text/html;charset=utf8");
$mysql_server_name = "localhost:3306"; //连接数据库端口
$mysql_username = "root@"; //用户名
$mysql_password = "123456"; //密码
$mysql_database = "test"; //数据库名称
$conn = new mysqli($mysql_server_name, $mysql_username, $mysql_password, $mysql_database); //构造函数mysql
// 检测连接
if ($conn->connect_error) {
die("连接失败: " . $conn->connect_error);
}
//echo "连接成功";
(2) 编写接受注册信息的register.php
<?php
include 'conn.php';
if (isset($_POST["submit"])) {
$username = $_POST["username"];
$password = $_POST["password"]; //获取表单数据
$pwd = $_POST["pwd"];
$phone = $_POST["phone"];
$email = $_POST["email"];
if ($name == null && $password == null) { //判断是否填写
echo "<script type=" . "\"" . "text/javascript" . "\"" . ">" . "window.alert" . "(" . "\"" . "请填写完成!" . "\"" . ")" . ";" . "</script>";
echo "<script type=" . "\"" . "text/javascript" . "\"" . ">" . "window.location=" . "\"" . "../login_register.html" . "\"" . "</script>";
} else {
if ($phone == null && $email == null) { //判断是否填写
echo "<script type=" . "\"" . "text/javascript" . "\"" . ">" . "window.alert" . "(" . "\"" . "请填写完成!" . "\"" . ")" . ";" . "</script>";
echo "<script type=" . "\"" . "text/javascript" . "\"" . ">" . "window.location=" . "\"" . "../login_register.html" . "\"" . "</script>";
} else {
if ($password != $pwd) { //确认密码是否正确
echo "<script type=" . "\"" . "text/javascript" . "\"" . ">" . "window.alert" . "(" . "\"" . "密码不一致!" . "\"" . ")" . ";" . "</script>";
echo "<script type=" . "\"" . "text/javascript" . "\"" . ">" . "window.location=" . "\"" . "../login_register.html" . "\"" . "</script>";
} else {
$password_sure = password_hash($password, PASSWORD_DEFAULT); //密码加密
$password = $password_sure;
$sql = $conn->query("SELECT username FROM login_register WHERE username ='{$username}'"); //查询数据库中的用户名和密码 并返回集合
$row = mysqli_fetch_assoc($sql); //取其中一行
if ($row > 0) { //判断是否存在
//判断数据库表中是否已存在该用户名
echo "<script type=" . "\"" . "text/javascript" . "\"" . ">" . "window.alert" . "(" . "\"" . "该用户名已被注册" . "\"" . ")" . ";" . "</script>";
echo "<script type=" . "\"" . "text/javascript" . "\"" . ">" . "window.location=" . "\"" . "../login_register.html" . "\"" . "</script>";
} else {
$sql01 = $conn->query("SELECT phone FROM login_register WHERE phone ='{$phone}'"); //查询数据库中的用户名和密码 并返回集合
$row01 = mysqli_fetch_assoc($sql01); //取其中一行
if ($row01 > 0) { //判断是否存在
//判断数据库表中是否已存在该用户名
echo "<script type=" . "\"" . "text/javascript" . "\"" . ">" . "window.alert" . "(" . "\"" . "该手机号已被注册" . "\"" . ")" . ";" . "</script>";
echo "<script type=" . "\"" . "text/javascript" . "\"" . ">" . "window.location=" . "\"" . "../login_register.html" . "\"" . "</script>";
} else {
$sql02 = $conn->query("SELECT email FROM login_register WHERE email ='{$email}'"); //查询数据库中的用户名和密码 并返回集合
$row02 = mysqli_fetch_assoc($sql02); //取其中一行
if ($row02 > 0) { //判断是否存在
//判断数据库表中是否已存在该用户名
echo "<script type=" . "\"" . "text/javascript" . "\"" . ">" . "window.alert" . "(" . "\"" . "该邮箱已被注册" . "\"" . ")" . ";" . "</script>";
echo "<script type=" . "\"" . "text/javascript" . "\"" . ">" . "window.location=" . "\"" . "../login_register.html" . "\"" . "</script>";
} else {
//values('$username','$password1','$password2')给变量加上单引号后,使得可以写入汉字和字母
$conn->query("INSERT INTO login_register(username,password,phone,email) VALUES('$username','$password','$phone','$email')"); //将注册信息插入数据库表中 //echo"$sql";
echo "<script type=" . "\"" . "text/javascript" . "\"" . ">" . "window.location=" . "\"" . "../return_register.html" . "\"" . "</script>";
}
}
}
}
}
}
}
(3) 编写接受判断登录信息的login.php
<?php
session_start();
include('conn.php');
if(isset($_POST["submit"])){
$username=$_POST["username"];
$password=$_POST["password"];
if($username==null && $password==null){//判断是否为空
echo"<script type="."\""."text/javascript"."\"".">"."window.alert"."("."\""."请填写正确的信息!"."\"".")".";"."</script>";
echo"<script type="."\""."text/javascript"."\"".">"."window.location="."\""."../login_register.html"."\""."</script>";
exit;
}
$sql = $conn->query("select username from login_register where username ='{$username}'"); //查询数据库中的用户名和密码 并返回集合
$row = mysqli_fetch_assoc($sql); //取其中一行
$sql_password = "SELECT password FROM login_register WHERE username='{$username}'";
$rows=$conn->query($sql_password);
$data=$rows->fetch_all();
$password_sure=$data[0][0];
if ($row > 0) { //判断是否存在
if (password_verify($password,$password_sure)) {
$_SESSION['username'] = $username;//传入session数据
echo"<script type="."\""."text/javascript"."\"".">"."window.location="."\""."登录成功后跳转页面"."\""."</script>";
}else{
echo"<script type="."\""."text/javascript"."\"".">"."window.alert"."("."\""."用户名或密码错误,登录失败!请您重新登录或注册"."\"".")".";"."</script>";
echo"<script type="."\""."text/javascript"."\"".">"."window.location="."\""."../login_register.html"."\""."</script>";
}
} else {
// echo $row;
echo"<script type="."\""."text/javascript"."\"".">"."window.alert"."("."\""."登录失败!请您重新登录或注册"."\"".")".";"."</script>";
echo"<script type="."\""."text/javascript"."\"".">"."window.location="."\""."../login_register.html"."\""."</script>";
}
}
php+mysql+apache实现登录注册系统的更多相关文章
- Django+pycharm+mysql 实现用户登录/注册(Django五)
首先是让Django项目与mysql数据库初步建立连接 具体做法见:pycharm连接mysql(注意其中第二步MySQL驱动最好安装最新版的) 这里讲一下我在做这一步遇到的问题.一般Driver 那 ...
- Django项目登录注册系统
Django项目之个人网站 关注公众号"轻松学编程"了解更多. Github地址:https://github.com/liangdongchang/MyWeb.git 感兴趣的可 ...
- Node.js Express连接mysql完整的登陆注册系统(windows)
windows学习环境: node 版本: v0.10.35 express版本:4.10.0 mysql版本:5.6.21-log 第一部分:安装node .Express(win8系统 需要&qu ...
- JavaWeb-SpringBoot_使用MySQL管理用户登录注册+接入腾讯短信SDK_demo
使用Gradle编译项目 传送门 项目已托管到Github上 传送门 JavaWeb-SpringBoot_一个类实现腾讯云SDK发送短信 传送门 用户注册 用户并非一定要输入正确的手机验证码去激活当 ...
- node+mysql+express实现登录/注册/修改密码/删除用户 接口
实现用户的注册.登录.修改密码.删除用户操作 用到的数据库:nodecms:表:user 目录结构: db目录下存放数据库操作语句: userSQL.js 用户有关的操作语句 router目录 接口路 ...
- IDEA+MySQL实现登录注册的注册验证时出现 Cannot resolve query parameter '2'
问题描述: 在IDEA+MySQL+Tomcat 实现登录注册JSP的注册信息INSERT验证时出现 Cannot resolve query parameter '2' 贴上创建链接的代码: if( ...
- MySQL前后台交互登录系统设计
1.首先我们做一个前台的注册页面 <!DOCTYPE html> <html> <head> <meta charset="UTF-8"& ...
- Django实现用户登录注册
本文将会介绍小白如何完成一个用户登录注册系统 新建一个Django项目,名字为login_register,并且使用命令manage.py startapp.User(名字自己随便起) 最终djang ...
- Java图形界面开发—简易登录注册小程序
登录注册小代码,将学过的一些小知识融合在一起进行了使用,加深印象.本例中如果有注释不详细的地方,详见其它博客. Java程序操作数据库SQLserver详解 功能介绍:简单的登录注册系统,使用了数据库 ...
随机推荐
- Django---进阶2
目录 数据的查,改,删 django orm中如何创建表关系 django请求生命周期流程图(必会) 路由层 路由匹配 无名分组 有名分组 无名有名是否可以混合使用 反向解析 作业 数据的查,改,删 ...
- day17 装饰器(上)
目录 一.什么是装饰器 二.为什么要有装饰器 三.无参装饰器的使用 一.什么是装饰器 装饰:是对其他已有的事物添加额外具有一定意义的事物 器:是一种工具,在程序内可以定义成函数 合到一起就是: 装 ...
- JavaScript学习 Ⅱ
五. JavaScript 数据类型 JavaScript 变量能够保存多种数据类型:数值.字符串值.数组.对象等等: var length = 7; // 数字 var lastName = &qu ...
- 组件toast(类似于element-ui的message组件)的实现
实现的toast组件可以通过this.$toast()调用 需要的知识: vue.extend(); new Vue().$mount(); //如果mount内没有要挂载的元素vue只会渲染元素而不 ...
- MYSQL 之 JDBC(十): JDBC的元数据
可以从Connection对象中获得有关数据库管理系统的各种信息 获取这些信息的方法都是在DatabaseMetaData类中. DatabaseMetaData:描述数据库的元数据对象 Result ...
- java 面向对象(四):类结构 方法(一)
类的设计中,两个重要结构之二:方法 方法:描述类应该具的功能. * 比如:Math类:sqrt()\random() \... * Scanner类:nextXxx() ... * Arrays类:s ...
- Django之ORM查询操作详解
浏览目录 一般操作 ForeignKey操作 ManyToManyField 聚合查询 分组查询 F查询和Q查询 事务 Django终端打印SQL语句 在Python脚本中调用Django环境 其他操 ...
- networkX.core_number(graph)
今天在学习别人特征工程的时候,看到这样一个函数,max_kcore = pd.DataFrame(list(nx.core_number(graph).items()), columns=[" ...
- Java数据类型自动转换(++ ,+=)
在算术表达式中的自动类型转换 数据从类型范围小的自动向数据范围大的转换 整数向浮点数转换(包括long类型向float转换) 例子: char类型的范围内与整数之间转换依据ASCII表 强制转换会丢失 ...
- css选择器大全
1.元素选择器 这是最基本的CSS选择器,HTML文档中的元素本身就是一个选择器: p {line-height:1.5em; margin-bottom:1em;} //设置p元素行高1.5em,距 ...