I added a couple of search fields for someone who comes to the home page they will be able to enter their:
STREET
CITY
STATE
ZIP
From this input criteria after pressing "Find Restaurants" they will receive links to restaurants who deliver to their input. The fields were added in the databases where needed.
It works fine when I add a restaurant link in the administration with one street, city, state and zip code. The search will find the restaurant link as long as the information is typed correctly in each of the fields in the search boxes. BUT...
if I put multiple zips: 70089, 70087, 70086 when inputing the restaurant link in adminstration.
When doing a search from the index (home page, where I added custom fields) I have to put all the zips with the commas in between, exactly how it was written when submitting the link in administration. This only happens with my custom search fields. If I go to the advanced search which I have not changed at all and put in any one of the zip codes it finds the link. How do I make it where in the zip field on the search form a person can put one zip code and it will look through the database and make it true by finding just one of zips listed in the zip field of the database.
Here is the code I inserted on the home page to do the searching:
<form action="<%db_cgi_url%>/search.cgi" method="GET">
<h2>Search</h2>
<div class="margin">
<table border="0" cellspacing="0" cellpadding="0">
<tr><td><strong class="search">Find a Restaurant who delivers to your address.</strong></td></tr>
<tr><td>Street: <input type="text" name="Street" size="20"></tr>
<tr><td>City: <input type="text" name="City" size="20"></tr>
<tr><td>State: <input type="text" name="State" size="2"></tr>
<tr><td>Zip Code: <input type="text" name="Zip" size="5"></tr>
<tr><td><input type=submit value="Search">
</td></tr>
<tr><td><small class="more"><a href="<%db_cgi_url%>/search.cgi">More search options</a></small></td></tr>
</table>
</div>
</form>
Please help me. I am new to this and seems I am close because the search will find restaurants, just not when I add multiple zips, or streets, or anything else.
Thanks.
James
STREET
CITY
STATE
ZIP
From this input criteria after pressing "Find Restaurants" they will receive links to restaurants who deliver to their input. The fields were added in the databases where needed.
It works fine when I add a restaurant link in the administration with one street, city, state and zip code. The search will find the restaurant link as long as the information is typed correctly in each of the fields in the search boxes. BUT...
if I put multiple zips: 70089, 70087, 70086 when inputing the restaurant link in adminstration.
When doing a search from the index (home page, where I added custom fields) I have to put all the zips with the commas in between, exactly how it was written when submitting the link in administration. This only happens with my custom search fields. If I go to the advanced search which I have not changed at all and put in any one of the zip codes it finds the link. How do I make it where in the zip field on the search form a person can put one zip code and it will look through the database and make it true by finding just one of zips listed in the zip field of the database.
Here is the code I inserted on the home page to do the searching:
<form action="<%db_cgi_url%>/search.cgi" method="GET">
<h2>Search</h2>
<div class="margin">
<table border="0" cellspacing="0" cellpadding="0">
<tr><td><strong class="search">Find a Restaurant who delivers to your address.</strong></td></tr>
<tr><td>Street: <input type="text" name="Street" size="20"></tr>
<tr><td>City: <input type="text" name="City" size="20"></tr>
<tr><td>State: <input type="text" name="State" size="2"></tr>
<tr><td>Zip Code: <input type="text" name="Zip" size="5"></tr>
<tr><td><input type=submit value="Search">
</td></tr>
<tr><td><small class="more"><a href="<%db_cgi_url%>/search.cgi">More search options</a></small></td></tr>
</table>
</div>
</form>
Please help me. I am new to this and seems I am close because the search will find restaurants, just not when I add multiple zips, or streets, or anything else.
Thanks.
James

