khan9999 Posted April 7, 2022 Share Posted April 7, 2022 i rephrase yours answer as look at the pagination code there is 3 pages and 2 pages and 10 pages total means when no search condition is given it created 10 pages but problem is when ist condition is true and in result bottom of 3 pages is created and when i click one of my page data is refresh but in bottom pagination is gone to 10 while it should restrict to similarity when 2nd condition is true 2 pages is created and when i click one of two pages , data is refresh correctly but but in bottom the pagination is gone to 10......my question is how i can restrict the pagination along with the data if(!empty($searchData) || !empty($searchName)) case "search_data":{ //code here //code for pagination for example 3 pages is created in this condition } break; case "search_name": { //code here //code for pagination for example 2 pages is created in this condition } break; } else { //code here //code for pagination for example 10 pages is created in this condition } } <form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?>"> <button type="submit value="search_data">Search Data</button> <button type="submit value="search_name">Search Name</button> </form> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now