PHP Connect DB
加油开心
你好呀
展开
-
利用HTML和PHP从数据库中取数据
开启wampserve ///////////////////////////////////// student.php <html> <head> </head> <?php include 'HTML2.html'; ?> <body> <form action="connect_database.php" meth...原创 2019-11-28 00:24:19 · 1226 阅读 · 0 评论 -
输出数据
<?php $servername = "localhost"; $username = "root"; $password = ""; $dbname = "test"; // 创建连接 $conn = mysqli_connect($servername, $username, $password, $dbname); // Check connection if (!$conn) ...原创 2019-11-07 01:55:27 · 211 阅读 · 0 评论 -
插入数据
<?php $servername = "localhost"; $username = "root"; $password = ""; $dbname = "test"; // 创建连接 $conn = mysqli_connect($servername, $username, $password, $dbname); // 检测连接 if (!$conn) { die("co...原创 2019-11-07 01:54:57 · 78 阅读 · 0 评论 -
创建数据表
<?php $servername = "localhost"; $username = "root"; $password = ""; $dbname = "test"; // 创建连接 $conn = mysqli_connect($servername, $username, $password, $dbname); // 检测连接 if (!$conn) { die("co...原创 2019-11-07 01:54:24 · 198 阅读 · 0 评论 -
创建数据库
<?php $servername = "localhost"; $username = "root"; $password = ""; // 创建连接 $conn = mysqli_connect($servername, $username, $password); // 检测连接 if (!$conn) { die("connect error: " . mysqli_...原创 2019-11-07 01:53:43 · 82 阅读 · 0 评论