mysql與php實現註冊頁面及資料記錄

2021-08-21 15:02:33 字數 845 閱讀 5139

html:

css:

html

input

.register

.register h1

label

button

php:

<?php

$username=$_post['username'];

$password=$_post['password'];

$email=$_post['email'];

$qq=$_post['qq'];

$phone=$_post['phone'];

$city=$_post['city'];

$dbc=mysqli_connect('127.0.0.1','root','','register') or die('連線資料庫錯誤!');

$query="insert into user_information values('$username','$password','$email','$qq','$phone','$city')";

$result=mysqli_query($dbc,$query) or die('資料請求失敗!');

mysqli_close($dbc);

echo '';

?>

此外還涉及sql資料庫中新建表時列的設定,對於不同的列需要對應不同的排序規則和型別,暫不熟悉,後續用到再補充。此外還有sql內資料的編號、刪除功能未學習。

此為學完第一二章,初步了解php和sql資料庫使用的總結。

寫完此文後發現的高階完整版,本文後續有需要會按此完善。

PHP登入註冊頁面

設定字符集 mysqli select db link,login name post username pwd post password rpwd post re password code post code if link else if strlen pwd 5 strlen pwd 10...

html form表單實現註冊頁面

瀏覽器向伺服器提交資料的兩種方式 form表單,ajax,form表單是將資料統一打包傳送給server,而ajax是填寫一條資料就傳送一次,做一次驗證 get和post方法的區別 get方法就是把客戶端的請求內容放在url後面會顯示出來,然後打包給服務端 1.提交的鍵值對,放在位址列中url後面 ...

vue註冊頁面

使用者註冊 left arrow click left dot 頁面的主體css樣式 login login head 新使用者註冊 p 手機號 class inp v model mobile right icon graphic 密碼框 placeholder 密碼 class inp v mo...