View Single Post
  #1  
Old 07-03-2003, 11:50 AM
 
grizjr82 grizjr82 is offline
 

Newbie
  
Join Date: Dec 2002
Posts: 4
 

Default search.php problem

When I go to this link:

http://www.godwintool.com/store/xcart/customer/search.php

It displays all the products instead of showing me the advanced search page. Is this supposed to happen? Am I supposed to pass some variables through search.php to display the advanced search page?

I didn't make any modifications to search.php so I don't understand what is going wrong.

Here is search.php:

Code:
# # $Id: search.php,v 1.26 2002/06/13 10:06:10 zorg Exp $ # require "../smarty.php"; require "../config.php"; @include "./https.php"; require "./auth.php"; require "../include/categories.php"; # # Permorfm SQL search query # $search_category = addslashes(array_pop(func_query_first("select category from categories where categoryid='$in_category'"))); $search_query = "(products.product like '%$substring%' or products.descr like '%$substring%') and categories.category like '$search_category%' and products.forsale='Y' group by products.productid"; $total_products_in_search = count(func_search_products($search_query, $user_account['membership'])); # # Navigation code # $total_nav_pages = ceil($total_products_in_search/$products_per_page)+1; require "../include/navigation.php"; $smarty->assign("products",func_search_products($search_query." limit $first_page, $products_per_page", $user_account['membership'])); $smarty->assign("navigation_script","search.php?substring=".urlencode($substring)."&in_category=$in_category"); $HTTP_GET_VARS["substring"] = stripslashes($HTTP_GET_VARS["substring"]); $smarty->assign("main","search"); $smarty->display("customer/home.tpl"); ?>

Any help would be appreicated. Thanks.
Reply With Quote