php链接mysql的基本方法
$username="username"; $password="password"; $database="your_database"; $table="your_table"; mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query="SELECT * FROM $table"; $result=mysql_query($query);