PHP 会员注册
第二题
$host = “mysql”;//MySQL所在的服务器的IP
$dbname = “database_24331_19_91502”;//数据库名称
$user = “24331_19_91502”;//数据库用户
$pwd = “8c2d3c32c2e69411c0759bfab0460c4e”;//数据库密码
$goodsTitle1=$_GET[“goodsTitle1”];
$goodsSales1=$_GET[“goodsSales1”];
$goodsTitle2=$_GET[“goodsTitle2”];
$goodsSales2=$_GET[“goodsSales2”];
$url = “mysql:host=mysql;dbname=database_24331_19_91502”;
$conn = new PDO($url,$user,$pwd);
$sql=”insert into goods(goodsTitle,goodsSales)values(‘$goodsTitle1’,’$goodsSales1’),(‘$goodsTitle2’,’$goodsSales2’)”;
$row = $conn->exec($sql);
var_dump($row);
PHP 会员注册
http://example.com/php-会员注册.html