Message board page style developed in PHP

Our code in this chapter does not use any page styles. The page looks very messy, which is not the effect we expected. Therefore, this chapter uses some css styles to make the page look more impressive.

Tips: When running online, some styles may not be visible due to the large size of the image. You can try it locally

css style


We use the show-hide effect injQuery on the post message page. When we click to post the message, the page we used to post the message will be displayed. Come out, the jQuery code is as follows

Note: To use jQuery’s display effect, you need to load the jQuery library, and you need to put the following piece of code into the head



# #JS

We need to verify the messages we publish. If the name and message are not filled in, we are not allowed to publish them. They need to be given. Prompt information, the code is as follows


##Complete page layout code

$total_page ? $total_page:$page;//当下一页数大于最大页数时的情况 //分页设置初始化 $start=($page-1)*$perpage; $sql= "select * from ressage_user order by id desc limit $start ,$perpage"; $result=mysqli_query($conn,$sql); ?>     留言板      

留言内容

  
姓名:留言时间: 删除
你的留言:
">首页   上一页 $i"; }else{ echo "$i"; } } ?>   下一页   ">末页   
In this way, our page layout is ready. The next step is to post a message and insert data into the database


##
Continuing Learning
||
$total_page ? $total_page:$page;//当下一页数大于最大页数时的情况 //分页设置初始化 $start=($page-1)*$perpage; $sql= "select * from ressage_user order by id desc limit $start ,$perpage"; $result=mysqli_query($conn,$sql); ?> 留言板

留言内容

  
姓名:留言时间: 删除
你的留言:
">首页 上一页 $i"; }else{ echo "$i"; } } ?> 下一页 ">末页
submit Reset Code
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!