Example #1
0
function contain($matchword)
{
    $con = ConnectDatabase("library");
    $sql = "select word from dictionary where word='{$matchword}';";
    //echo $sql;
    $result = mysqli_query($con, $sql);
    if (mysqli_num_rows($result) < 1) {
        return false;
    } else {
        return true;
    }
    CloseDatabase($con);
}
Example #2
0
    echo "</tr>";
}
echo "</table>";
//上一页和下一页
$prevpage = $page - 1;
if ($page >= $totpage) {
    $nextpage = $totpage;
} else {
    $nextpage = $page + 1;
}
//跳转
echo "<h3><center><font color=\"black\">共{$totpage}页</font> &nbsp;&nbsp;&nbsp;<a href='search.php?p={$prevpage}#searchresult' style=\"color:#000000\">上一页</a> | <a href='search.php?p={$nextpage}#searchresult' style=\"color:#000000\">下一页</a></center></h3>";
echo "</center>";
echo "</table>";
echo "</center>";
CloseDatabase($con);
?>

</section>


   
   

    <!-- jQuery -->
    <script src="js/jquery.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="js/bootstrap.min.js"></script>

    <!-- Plugin JavaScript -->