第一个get接口
<?php $con = mysql_connect("127.0.0.1","root","123456"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("my_db", $con); // 插入数据 $first = $_GET["first"]; $second = $_GET["second"]; $age = $_GET["age"]; mysql_query("INSERT INTO Persons (FirstName, LastName, Age) VALUES ($first, $second, $age)"); // 查询数据 $result = mysql_query("SELECT * FROM Persons"); $row = mysql_fetch_array($result); print_r($row); mysql_close($con); ?>