PhpDig.net

PhpDig.net (http://www.phpdig.net/forum/index.php)
-   How-to Forum (http://www.phpdig.net/forum/forumdisplay.php?f=33)
-   -   $site variable is not propagated to search_function.php (http://www.phpdig.net/forum/showthread.php?t=2391)

RonHoef 03-04-2006 10:03 PM

$site variable is not propagated to search_function.php
 
I've used PhpDig to index several websites on my server. That is, they are all indexed in the same mySQL database.

I set up a search box on one of the websites, and in order for the search to return hits that apply to that website only, I included the following input tag to be passed to search.php:

<input type="hidden" name="site" value="n">

where "n" is the site_id (gotten from the mySQL database) for the particular site.

If the user enters a search argument that is found, all works well. He gets a list of hits ONLY for site=n. However, if he misspells a word (for example "dynamte" instead of "dynamite") PhpDig responds with "No results. Did you mean <dynamite>?"

Here's the problem. If the user clicks on the prompt for <dynamite> PhpDig returns hits from ALL websites in the database, rather than hits for site=n only! The site_id value I supplied on the original query (where the user misspelled the word) has not been passed along to this second query.

Is this a bug or is there some way I can force the second, corrected query to limit itself to the one specific website?

Thanks in advance.

Ron


All times are GMT -8. The time now is 08:39 PM.

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