bradgrafelman;11008305 wrote:All of the code necessary to query the database for relevant information, retrieve the results, and output an HTML document containing the information.
So I am guessing that would be all this below
<?php
if(!empty($_GET['minPrice']) && !empty($_GET['maxPrice']))
{
$comparison = sprintf('priceCol BETWEEN %f AND %f', $_GET['minPrice'], $_GET['maxPrice']);
}
elseif(!empty($_GET['minPrice']))
{
$comparison = 'priceCol >= ' . (float)$_GET['minPrice'];
}
elseif(!empty($_GET['maxPrice']))
{
$comparison = 'priceCol <= ' . (float)$_GET['maxPrice'];
}
else
{
// no min or max price given... error? show all products? something else?
}
?>
In this includes/languages/showproducts.php file, where would be the best place to put the above coding
<?php
/*
$Id$
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2002 osCommerce
Released under the GNU General Public License
*/
define('NAVBAR_TITLE', 'Products Price Range Results');
define('HEADING_TITLE', 'Products Price Range Results');
define('TEXT_INFORMATION', '');
?>