$datebase["host"]="localhost:6033"; //主机
$datebase["user"] = "ms"; //用户名
$datebase["password"]= "ms";//密码
$datebase["db"]="edu"; //数据库
$conn=mysql_connect($datebase["host"], $datebase["user"], $datebase["password"]) or die("连接数据库出错: " . mysql_error());
mysql_select_db($datebase["db"],$conn) or die("Select Datebase Error: " . mysql_error());
$sql="insert into test (username,password) values ('test','test')";
//$sql="delete from test where id = 1";
//$sql="update test set password='".md5('pass')."' where username='test'";
mysql_query($sql,$conn) or die("insert : Error:1" . mysql_error($conn));
$sql = "SELECT * FROM test";
$result = mysql_query($sql,$conn) or die("SELECT Error:2 : " . mysql_error($conn));
while($rs = mysql_fetch_array($result)){
echo $rs['username'].'='.$rs['password'].'<br>';
}
echo "test";