html页面代码:











php页面代码:

$uid=$_GET['oid'];
$screen_name=$_GET['screen_name'];
$location=$_GET['location'];

$db = new PDO("mysql:host=blog.bwphp.cn;dbname=wangbao","wangbao", "1234",array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \'utf8\''));
$db->query("set names utf8");

$addsql = "insert into sina_oauth(uid,screen_name,location) values('$uid','$screen_name','$location')";
$add = $db->exec($addsql);
if($add){
    echo "用户信息以成功入库";
}else{
    $db->errorInfo();
}
?>