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; formmethod & quot; get & quot; 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 |
|
|
|