Created login database with PHP, cannot see it in MySQL
LinXY
LinXY 2019-03-07 15:38:33
0
2
1007

<?php

header("Content-type:text/html;charset=utf-8"); //Set encoding

$servername = "localhost";

$username = "root";

$password = "1234";

$dbname = "login";

// Create connection

$conn = mysqli_connect($servername, $username, $password, $dbname);

mysqli_set_charset($conn,'utf8'); //Set character set

//Detect connection

if (!$conn) {

die("Connection failed: " . mysqli_connect_error());

}

/ / Use sql to create a data table

$sql = "CREATE TABLE user (

id INT(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY,

username VARCHAR(30) NOT NULL,

password VARCHAR(30) NOT NULL

);";

if (mysqli_query($conn, $sql)) {

echo "data Table user was created successfully";

} else {

echo "Error in creating data table: " . mysqli_error($conn);

}

mysqli_close ($conn);

?>


LinXY
LinXY

reply all(1)
陈辉

Acridine

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template