Php paging output & lt; form & nbsp; methodpost & nbsp; nameform & nbsp; ctionindex. php? Actquery & nbsp; onSubmitreturn & nbsp; chkinput_search (this) & gt; & lt; input & nbsp; id php paging output
Here is the search. php page
*****************************
Here is the searchshow. php page
?>
Include ("conn/conn. php ");
Include ("search. php ");
$ Search =$ _ POST [search];
$ Xuanze = $ _ POST [xuanze];
If ($ _ POST [search] = ""){
$ Search =$ _ GET [search];
$ Xuanze = $ _ GET [xuanze];
}
If (shoptype = "$ xuanze "){
$ Sql1 = mysql_query ("select count (*) as total from tb_members where shoptype = '$ search' order by mid ");
} Elseif (user = "$ xuanze "){
$ Sql1 = mysql_query ("select count (*) as total from tb_members where user = '$ search' order by mid ");
} Elseif (shopname = "$ xuanze "){
$ Sql1 = mysql_query ("select count (*) as total from tb_members where shopname = '$ search' order by mid ");
}
$ Minfo = mysql_fetch_array ($ sql1); // error
$ Total = $ minfo [total];
$ Pagesize = 5;
If ($ total <= $ pagesize ){
$ Pagecount = 1;
}
If ($ total % $ pagesize )! = 0 ){
$ Pagecount = intval ($ total/$ pagesize) + 1;
} Else {
$ Pagecount = $ total/$ pagesize;
}
If ($ _ GET [page]) = ""){
$ Page = 1;
} Else {
$ Page = intval ($ _ GET [page]);
}
If (shoptype = "$ xuanze "){
$ SQL = mysql_query ("select * from tb_members where shoptype = '$ search' order by mid limit". ($ page-1) * $ pagesize. ", $ pagesize ");
} Elseif (user = "$ xuanze "){
$ SQL = mysql_query ("select * from tb_members where user = '$ search' order by mid limit". ($ page-1) * $ pagesize. ", $ pagesize ");
}
Elseif (shopname = "$ xuanze "){
$ SQL = mysql_query ("select * from tb_members where shopname = '$ search' order by mid limit". ($ page-1) * $ pagesize. ", $ pagesize ");
}
$ Info = mysql_fetch_array ($ SQL); // errors also occur here
?>
| Account |
Contact |
Store name |
Type |
Contact number |
Contact Address |
If ($ info ){Do {?>
|
|