我真的不知道我做错了什么。所有其他查询(SELECT 查询)都可以正常工作,但这似乎不起作用。有任何想法吗?
<?php
session_start();
$host="*******"; // Host name
$username="*******"; // Mysql username
$password="*******"; // Mysql password
$db_name="*******"; // Database name
$from = $_GET['from'];
$to = $_GET['to'];
// Connect to server and select databse.
$con = mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name",$con)or die("cannot select DB");
mysql_query("INSERT INTO message('from', 'to', 'message', 'confirm') VALUES (2,3,'would like to add you as a friend',1)");
echo'The request has been sent.';