<?php
//connecting to server
$dbc = mysql_connect('localhost','root','');
if(!$dbc){
die('Not Connected : '.mysql_error());
}
//connecting to database
$db_selected = mysql_selectdb("kalhan",$dbc);
if(!db_selected){
die('Cannot Connect'.mysql_error());
}
//testing database
$query = "UPDATE userinformation SET username = 'i am not working properly' where name = 'kalhan'";
$result = mysql_query($query);
?>
代码显示了上面提到的错误。我只是在编码的连接部分之后测试我的数据库......帮助