Simply learn PHP's code to insert data into MySQL
$dbhost = localhost;
$dbuser = webjxcom; Your MySQL user name
$dbpass = 123456; Your MySQL password
$dbname = database; Your MySQL library name
Connecting to a local database
$conn = mysql_connect ($dbhost, $dbuser, $dbpass);
if ($conn) {
echo "Connection to database Success";
} else {
echo "Failed to connect to database";
}
Open Database
mysql_select_db ($dbname, $conn);
Inserting data
$sql = "INSERT INTO test (test) VALUES (DDDDDDD)";
$result =mysql_query ($sql, $conn) or Die (Mysql_error ());
echo "Open database";
Close the database
Mysql_close ($conn);
?>
http://www.bkjia.com/PHPjc/531664.html www.bkjia.com true http://www.bkjia.com/PHPjc/531664.html techarticle simply learn PHP's code to insert data into mysql? php $dbhost = localhost; $dbuser = webjxcom;//your mysql username $dbpass = 123456;//your MySQL password $dbname = database; Your ...