谢谢, 是要用qurey.
我看这个例子好了.
<?php
$con=mysqli_connect("example.com","peter","abc123","my_db");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
mysqli_query($con,"INSERT INTO Persons (FirstName, LastName, Age)
VALUES (*Peter*, *Griffin*,35)");
mysqli_query($con,"INSERT INTO Persons (FirstName, LastName, Age)
VALUES (*Glenn*, *Quagmire*,33)");
mysqli_close($con);
?>
http://www.w3cschool.cc/php/php-mysql-insert.html