PhpDig.net

PhpDig.net (http://www.phpdig.net/forum/index.php)
-   Troubleshooting (http://www.phpdig.net/forum/forumdisplay.php?f=22)
-   -   Help including search.php (http://www.phpdig.net/forum/showthread.php?t=2741)

dhoyos 01-20-2007 11:51 AM

Help including search.php
 
Hello,
I am having trouble embedding the results of my phpdig search on the website since I upgraded to 1.8.8. What I used to do was have an if statement on the index page where by if someone had submited a search query it would include search.php and display the results. The code is as follows:

if ($_GET[content]=='search'){
include('/home/xxxxxx/public_html/search.php');
}

This would work beautifuly because I had created a template which would output a table that used all of the styles created for the site.

Now however when I submit the form on the index page and it includes the search.php I get no results. I can't understand it, its as if it isn't searching or something. however when I search directly through search.php it works just fine. Somehting doesn't seem to be working because of the include. Any help would be greatly appreciated. Let me know if you need any more information.

dhoyos 01-20-2007 11:59 AM

Sorry I should mention that the file which I want to embed the results is in the / folder and the search file in the /search/ folder. I looked at the information in the configuration file about searching from the root folder instead of the /search/ folder but it didn't seem to work. Thanks.

Charter 02-02-2007 12:53 PM

Is there a form on your index page? If so, what are its contents? Untested, but perhaps try the following. It's hard to say for sure, as there isn't enough info for me to go on.
Code:

if ($_REQUEST['query_string'] && $_REQUEST['search'] == 'Go')
{
        include('/home/xxxxxx/public_html/search.php');
}



All times are GMT -8. The time now is 02:37 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.