簡單的網頁登入

2021-08-09 18:22:56 字數 1178 閱讀 2952

建立資料庫檔案

原始碼:

mysql -u root -p --登入資料庫

create database test; --建立資料庫

use test; --進入資料庫

create table account --建立資料表

(id int(10) unsigned auto_increment primary key,

username varchar(30) not null,

password varchar(30) not null)

default charset=utf8;

insert into account --插入資料

(username, password)

values

("123","123456");

建立登入頁面

原始碼(原始碼來自:原始碼之家

(注:相關的js、img、css資料夾省略)

伺服器端的php**:

<?php 

session_start();

header("content-type:text/html;charset=utf-8");

$link = mysqli_connect('localhost','root','toor','test');

if (!$link)

$username = $_post["username"];//使用者名稱

$password = $_post["password"];//密碼

if($username == "")

if($password == "")

$sql = "select * from account_information";

$result = mysqli_query($link, $sql);

$rows = mysqli_fetch_array($result);

echo "";

?>

效果圖:

簡單的網頁登入程式

在登入頁面輸入使用者名稱和密碼,是乙個html頁面 無標題文件 title head body form action chuli.php method post div 使用者名稱 input type text name uid div div 密碼 input type text name p...

爬蟲 登入網頁

usr bin env python coding utf 8 file loginmmvoip.py author lucasysfeng revision 2014 06 13 14 26 11 description 登入 獲取cookie 訪問任意url import cookielib i...

簡單的登入

一 資料庫,表如下圖,id自動增長 二 解決資源管理器的圖 三 登入的 using system using system.collections.generic using system.componentmodel using system.data using system.drawing u...