Basic Search

4 posts by 2 authors in: Forums > CMS Builder
Last Post: July 6, 2009   (RSS)

By _kate_ - June 30, 2009 - edited: June 30, 2009

Hi,
Trying to create a standard search box for a site using the help guide yet having no luck. Here's what I have so far....

SEARCH FORM
<form method="POST" action="search.php">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="162" valign="middle"><label><input type="text" name="title" value="" class="search"></label></td>
<td width="34" valign="middle"><label>
<input type="image" name="submit" id="GO2" value="Search" src="imgs/go.jpg" />
</label></td>
</tr>
</table>
</form>


RESULTS PAGE
<?php
require_once "/mysiteaddy/viewer_functions.php";

list($jewelleryRecords, $jewelleryMetaData) = getRecords(array(
'tableName' => "jewellery",
));

list($products_lea_steinRecords, $products_lea_steinMetaData) = getRecords(array(
'tableName' => "products_lea_stein",
));

list($products_vintage_jewelleryRecords, $products_vintage_jewelleryMetaData) = getRecords(array(
'tableName' => "products_vintage_jewellery",
));

list($products_gentlemensRecords, $products_gentlemensMetaData) = getRecords(array(
'tableName' => "products_gentlemens",
));

list($products_decorativeRecords, $products_decorativeMetaData) = getRecords(array(
'tableName' => "products_decorative",
));

list($products_collectiblesRecords, $products_collectiblesMetaData) = getRecords(array(
'tableName' => "products_collectibles",
));

list($products_sewingRecords, $products_sewingMetaData) = getRecords(array(
'tableName' => "products_sewing",
));

?>

Re: [_kate_] Basic Search

By ross - July 3, 2009

Hi Kate

Thanks for posting!

Could you give me some more detail about what's happening here? Perhaps a link to the site so I can try it out myself. At the least though, could you let me know what you expected to happen and then what's happening instead?

Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [ross] Basic Search

By _kate_ - July 3, 2009

Haha sorry probably should have included that!!

The site has products on it - I just want it to search the product name field. Don't know if it will be a problem that the products are all in different sections?

Anyway when you hit search with nothing typed in, it merely shows all the products from the first section listed (jewellery). If you type any word in at all it will say no products to display, even if you use a word that is in the title of an item