|
楼主 |
发表于 2006-9-28 16:05:12
|
显示全部楼层
版主,下面是我的程序,能给我加点session代码吗!我是菜鸟啊!
<html>
<head>
<title></title>
</head>
<body>
<?php
$connect=mysql_connect("localhost","root","");
mysql_select_db("counter",$connect);
$query="select * from counter";
$result=mysql_query($query);
if($result)
{
$r=mysql_fetch_array($result);
$counter=$r["count"];
$counter=$counter+1;
echo "来访人数:".$counter;
}
$query="update counter set count='$counter' where id=1";
$result=mysql_db_query("counter",$query);
mysql_close($connect);
?>
</body>
</html> |
|