One, we use WAMP, first guarantee Wamp open, service open state
Second, create the database, create the table
Note that the data set here is to choose UTF8, otherwise the insert data will be garbled to create table selection advanced properties, also set the dataset can set the ID as the primary key and self-growth so that the database shoes is created, and there is an empty table shoes_jd_wx. Third, connect the database to create the file dblink.php
<?PHPHeader("Content-type:text/html;charset=utf-8");//Set charactererror_reporting(0);//Block PHP Error$dblink=mysql_connect("localhost", "root", "");//database account, password, here the password is emptymysql_select_db("Shoes");//Databasemysql_query("SET NAMES UTF8");//Set character/*if ($dblink) {//can determine if the successful link was successfully linked;} else{echo "link Failed";}*/?>
Php+sql creating a local project detailed steps to create a database data table, database connection