session_start();
$conn=mysql_connect('localhost','root','root')or die('数据库连接错误');
mysql_select_db('demo',$conn);
mysql_query("set names 'gbk'");
$us=$_session['username'];
$selequery=mysql_query("select * from blog where author='$us' order by id desc")or die("查询失败");
?>