Jump to content

search in a dynamic page


gwolgamott

Recommended Posts

I'm not sure why I'm having issues with wrapping my head around this, but here's my problem I have a dynamic php site setup directed with requests.

using the method below...

if (!isset($_REQUEST['page'])) 
					{ 
					$folder_page = "index/Home";
					// Page has not been requested, show default page
					$page = 'index/Home/struct.php';
					} 

				else 
					{
					 // request page here
					$page = $_REQUEST['page'];
					$folder_page = '/index/'.$page;
					$page = ('index/'.$page.'/struct.php');						
					} // End if page has been requested

				// Check to see if page exists
				if (file_exists($page)) 
					{ 
					// Page exists

					// Show page
					include("./$page");
					} 

				else 
					{ 
					// Page doesn't exist
					echo 'Sorry, the page that you are trying to access does not exist.';
					} // End if page exists

 

Works fine and setup as it was wanted when I did that, now a search is wanted. I've got the search working, what my problem is is that I need to figure out how to make the search to be displayed as part of the main page. So as when the data is searched to display the results not as it's own page but within the dynamic page setup. But having issues sending the search then redirecting the information without screwing up the request url for the page. I think I'm over thinking this.... help please

 

Link to comment
https://forums.phpfreaks.com/topic/195429-search-in-a-dynamic-page/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.