I am eager to ask questions about PHP paging assignment. it will help me solve the problem. I have attached the code to it for five hours and have not solved it yet.

Source: Internet
Author: User
Urgent PHP paging assignment .... helping solve this problem ..... I waited for the code to be attached online and waited for 5 hours. you have not solved the problem yet. & lt; sousuoxianshi. PHP & gt; & lt; divid = & quot; connent & quot; & gt; & lt; divid = & quot; sousuo & quot; & gt; & lt; for urgent PHP paging assignment .... helping solve this problem ..... I waited for the code to be attached online and waited for 5 hours. you have not solved the problem yet.













(Search for related categories in business cards, such as household management and real estate)

$ Conn = mysql_connect ("localhost", "root", "toma123") or die ("connection error ");
Mysql_select_db ("cs", $ conn );
Mysql_query ("set names 'gbk '");
Mysql_query ("set characher set gb2312 ");
Mysql_query ("set names gb2312 ");
$ Key = $ _ GET ['key'];

?>











$ Conn = mysql_connect ("localhost", "root", "toma123") or die ("connection error ");
Mysql_select_db ("cs", $ conn );
Mysql_query ("set names 'gbk '");
Mysql_query ("set characher set gb2312 ");
Mysql_query ("set names gb2312 ");

$ Md = $ _ GET ['key'];



If ($ md! = ""){

$ SQL = "select * from ud8 where title like '% $ md % '";

$ Result = mysql_query ($ SQL );

$ Sst = mysql_fetch_array ($ result );

$ Num = mysql_num_rows ($ result); // count the number of rows

$ Pages = ceil ($ num/8); // total number of pages

$ Page = $ _ GET ['Page']; // Obtain the page. If no page is set or the page is 0, set $ page to 1;

If ($ page = "")
{
$ Page = 1;
}

$ Start = ($ page-1) * 8;

$ SQL = "select * from ud8 where title like '% $ md %' limit". $ start. ",". 8;

$ Query = mysql_query ($ SQL );

While ($ sumpage = mysql_fetch_array ($ query )){

$ Id = $ sumpage ['id'];

$ Dd = $ id;



?>













Company name Business introduction Thumbnail View business cards

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.