PHP分页显示内容,只能显示查询到的第一天记录内容,点击下一页内容就是空的,请问怎样解决这个问题啊

<?php
include("connect_mysql.php");
$page_size=1;
$offset=@$_REQUEST["offset"];
if (empty($offset)) {
    $offset=0;
    $this_page_no=1;
    $pages=1;
}
?>
<!DOCTYPE html>
<html>
<head>
    <title>挂号信息管理</title>
    <style type="text/css">
        a.one:link{
            text-decoration: none;
            color: black;
        }
        a.one:visited{
            text-decoration: none;
            color: black;
        }
    </style>
</head>
<body>
<table cellpadding="0" cellspacing="0" >
    
    <tr>
        <td height="600" width="1500" background="D:\wamp\wamp64\www\image\5.jpg" valign="top" colspan="2">
            <h3 align="center">
</h3>
<table border="1"  cellpadding="0" align="center" height="330" width="1200" border="1">
    <?php
        $pid=@$_REQUEST["pid"];
        $sql="select * from bl where pid='$pid' ";
        $result=mysqli_query($conn,$sql);
        $count=mysqli_num_rows($result);
        $sql1="select * from bl where pid='$pid' limit $offset,$page_size";
        $result=mysqli_query($conn,$sql1);
        while($s=mysqli_fetch_row($result)){
            echo "<tr>";
            echo "<td>编号:</td>";
            echo "<td >$s[0]</td>";
            echo "</tr>";
            echo "<tr>";
            echo "<td>姓名:</td>";
            echo "<td >$s[2]</td>";
            echo "<td>性别:</td>";
            echo "<td >$s[3]</td>";
            echo "<td>年龄:</td>";
            echo "<td >$s[4]</td>";
            echo "</tr>";
            echo "<tr>";
            echo "<td>科室:</td>";
            echo "<td >$s[5]</td>";
            echo "</tr>";
            echo "<tr>";
            echo "<td>就诊时间:</td>";
            echo "<td >$s[7]</td>";
            echo "<td>就诊医生:</td>";
            echo "<td >$s[6]</td>";
            echo "</tr>";
            echo "<tr>";
            echo "<td>主诉:</td>";
            echo "<td colspan=5>$s[8]</td>";
            echo "</tr>";
            echo "<tr>";
            echo "<td>现病史:</td>";
            echo "<td colspan=5>$s[9]</td>";
            echo "</tr>";
            echo "<tr>";
            echo "<td>既往史:</td>";
            echo "<td colspan=5>$s[10]</td>";
            echo "</tr>";
            echo "<tr>";
            echo "<td>过敏史:</td>";
            echo "<td colspan=5>$s[11]</td>";
            echo "</tr>";
            echo "<tr>";
            echo "<td>家族史:</td>";
            echo "<td colspan=5>$s[12]</td>";
            echo "</tr>";
            echo "<tr>";
            echo "<td>体格检查:</td>";
            echo "<td colspan=5>$s[13]</td>";
            echo "</tr>";
            echo "<tr>";
            echo "<td>治疗意见:</td>";
            echo "<td colspan=5>$s[14]</td>";
            echo "</tr>";
        }
    ?>
</table>
            <p  align="center">记录数:<?php echo $count; ?>&emsp;
                <a class="one" href="<?php echo $_SERVER['PHP_SELF']; ?>?offset=0" target=_self>首页</a>&emsp;
                <?php
                    if ($offset) {
                        $preoffset=$offset-$page_size;
                        echo "<a href='$_SERVER[PHP_SELF]?offset=$preoffset' target='_self' class='one'>上一页</a>&emsp;";
                    }
                    else
                        echo "上一页";
                    $pages=ceil($count/$page_size);
                    $nextoffset=$offset+$page_size;
                    $nextoffset=$offset+$page_size;
                    if (($pages!=0) && ($nextoffset<$count)) {
                        echo "<a href='$_SERVER[PHP_SELF]?offset=$nextoffset' target='_self' class='one'>下一页</a>&emsp;";
                    }
                    else
                        echo "下一页";
                    $pages=ceil($count/$page_size);
                    $lastoffset=($pages-1)*$page_size;
                    $this_page_no=ceil($offset/$page_size)+1;
                ?>
                <a class="one" href="<?php echo $_SERVER['PHP_SELF']; ?>?offset=<?php echo $lastoffset; ?>" target=_self>尾页</a>
            
        </td>
    </tr>
</table>
</body>
</html>

Php是不可以分页的。你完全可以用js代替。