i add switch to searchresults.php $pageNum = 1; if(isset($_GET['page'])) { $pageNum = (int)$_GET['page']; switch ($pageNum) { case "4": require_once(FILESYSTEM_PATH .'searchresults.php'); break; case "3": require_once(FILESYSTEM_PATH .'searchresults.php'); break; case "2": require_once(FILESYSTEM_PATH .'searchresults.php'); break; case "1": require_once(FILESYSTEM_PATH .'searchresults.php'); break; default: require_once(FILESYSTEM_PATH .'searchresultsnull.php'); } } this good work show only 4 page results listing but show msg down page this msg Fatal error: Call to a member function formatNumber() on a non-object in problem for default: require_once other file name searchresultsnull this change to searchresults hide msg but show all page i want 4 page how this work
This makes absolutely zero sense to me at all. Why would you 'require_once' the file that you are already in? Why would you use a switch when you are doing the same thing in all cases, but one? It is giving you a fatal error, because you are telling it to 'require_once' a file that doesn't exist. There is no such file called, "searchresultsnull.php". You should also have a break at the end of your default case in the switch statement, just like you do in all other "cases". I really can't offer any advice as it is not clear what you are trying to do at all.
hi mike this file searchresultsnull.php for hide not show listing more 4 page its now work i add code for hide err its now work i want this for Telephone directory I own more than 500,000 telephone directory number do not want show complete only through research of the importance of these information as a privilege for my site and I don't want a competition sites that take these data. In this way keep the stand of these numbers I have modified many of the codes and I'm not me sufficient knowledge of codes but eventually worked I do not know how but succeeded in this