还是有问题,而且好像问题更多了
Warning: mysql_connect() [function.mysql-connect]: Client does not support authentication protocol requested by server; consider upgrading MySQL client in d:\AppServ\www\count.php on line 12
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in d:\AppServ\www\count.php on line 18
Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in d:\AppServ\www\count.php on line 21
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in d:\AppServ\www\count.php on line 21
Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource in d:\AppServ\www\count.php on line 24
源程序为
<?
//------[基本设定]-------
$mysql_server_name = "localhost";
$mysql_username = "**********";
$mysql_password = "*******";
$mysql_database = "******";
//-------
//建立连线---通过(服务器名称、用户姓名、用户密码)
$conn = mysql_connect($mysql_server_name, $mysql_username, $mysql_password);
//准备好你的sql语法
$sql = "INSERT INTO `count` ( `new` ) VALUES ('1')";
//准备你要处理的资料库
mysql_select_db($mysql_database,$conn);
//进行查询
$result = mysql_query($sql);
//结束并释放链路
mysql_close($conn);
?>