亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

PHP login registration link database

First we create a conn.php file

The code is as follows:

<?php
    header("Content-type: text/html; charset=utf-8");//設(shè)置編碼
    $con = mysql_connect("localhost","root","root") or die("數(shù)據(jù)庫(kù)連接失敗");
    mysql_select_db('login') or  die("指定的數(shù)據(jù)庫(kù)不能打開");
    mysql_query("set names utf8");//設(shè)置數(shù)據(jù)庫(kù)的字符集
?>

First we set a character encoding. When there is Chinese in this file, there will be no garbled characters

Then connect to the database

localhost server root username root password

If your server is 127.1.1.1, then you can

$con = mysql_connect("127.1.1.1","Username","Password") or die("Database connection failed");

Open your database, as shown in the fourth line above, database name for login

Continuing Learning
||
<?php echo "歡迎學(xué)習(xí)鏈接數(shù)據(jù)庫(kù)課程" ?>
submitReset Code