header("content-type:text/html;charset=utf-8");//設定頁面内容是html編碼格式是utf-8
//1.接收資料
$name = $_POST['name'];
$tel = $_POST['tel'];
//資料插入的天龍八部
//1.資料庫連接配接
$pdo = new PDO('mysql:host=sh-cdb-anr5wfga.sql.tencentcdb.com;dbname=collect_information;port=63512','dbmodify','IFreshwing2018!');
$pdo->exec('set names utf8');
// $link = mysql_connect("sh-cdb-anr5wfga.sql.tencentcdb.com:63512","dbmodify","IFreshwing2018!","collect_information") or die("資料庫連接配接失敗");
if($pdo->exec('insert into information (name,tel,information_sources) values("'.$name.'","'.$tel.'","永新官網")')){
echo 100;
}else{
echo 1001;
}