dharmachic
Technical User
Hi all,
I'm a bit new to cgi but familiar enough to create basic forms. I've created several drop down lists for an advance search and would like the search results to contain only the precise criteria selected. Is there a particular command I could just add?
OK, here's my form to maybe make things a bit clearer:
<form action=ezwebstore.cgi method=post>
<div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Search
by Keyword:
<input type="text" name="keywords" size="16" maxlength="60" value="">
<br>
<br>
or use our Advanced Search<br>
</font></div>
<table cellspacing=2 cellpadding=2 width=400 border=0>
<tr>
<td align=left width=33%><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Jewelry
Type </font></td>
<td align=left width="33%"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Special</font></td>
<td align=left width="33%"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Stone
Shape </font></td>
</tr>
<tr>
<td align=left width="33%"> <font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<select name="category">
<option value="-----" selected>-----</option>
<option value="RINGS">RINGS</option>
<option value="BRACELETS">BRACELETS</option>
</select>
</font></td>
<td align=left width="33%"> <font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<select name="userDefinedFour">
<option value="-----" selected>-----</option>
<option value="BASIC">BASIC</option>
<option value="FASHION">FASHION</option>
<option value="HIGH LINE">HIGH LINE</option>
<option value="LIGHT WEIGHT">LIGHT WEIGHT</option>
<option value="FLAT BACK">FLAT BACK</option>
</select>
</font></td>
<td align=left width="33%"> <font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<select name="userDefinedOne">
<option value="-----" selected>-----</option>
<option value="Oval">Oval</option>
<option value="Octagon">Octagon</option>
<option value="Cush">Cush</option>
<option value="Pear">Pear</option>
<option value="Wavette">Wavette</option>
<option value="Diamond">Diamond</option>
<option value="Heart">Heart</option>
<option value="Round">Round</option>
<option value="Trillion">Trillion</option>
</select>
</font></td>
</tr>
<tr>
<td align=left width=33%><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Style
</font></td>
<td align=left width="33%"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Stone
Size </font></td>
<td align=left width=33%><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> </font></td>
</tr>
<tr>
<td align=left width="33%"> <font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<select name="userDefinedFive">
<option value="-----" selected>-----</option>
<option value="STONE">STONE</option>
<option value="PEARL">PEARL</option>
<option value="ALL DIAMOND">ALL DIAMOND</option>
<option value="NO DIAMOND">NO DIAMOND</option>
</select>
</font></td>
<td align=left width="33%"> <font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<select name="name">
<option value="-----" selected>-----</option>
<option value="5x3">5x3</option>
<option value="5x4">5x4</option>
<option value="6x3">6x3</option>
<option value="6x4">6x4</option>
<option value="7x5">7x5</option>
<option value="8x4">8x4</option>
<option value="8x5">8x5</option>
<option value="8x6">8x6</option>
<option value="9x6">9x6</option>
<option value="9x7">9x7</option>
<option value="10x4">10x4</option>
<option value="10x5">10x5</option>
<option value="10x7">10x7</option>
<option value="10x8">10x8</option>
<option value="11x9">11x9</option>
<option value="12x6">12x6</option>
<option value="12x10">12x10</option>
<option value="14x10">14x10</option>
<option value="14x12">14x12</option>
<option value="16x8">16x8</option>
<option value="16x12">16x12</option>
<option value="18x9">18x9</option>
<option value="18x13">18x13</option>
<option value="4mm">4mm</option>
<option value="5mm">5mm</option>
<option value="5.5">5.5</option>
<option value="6mm">6mm</option>
<option value="7mm">7mm</option>
<option value="7.5">7.5</option>
<option value="8mm">8mm</option>
</select>
</font></td>
<td align=left width="33%"> <font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<input type="hidden" name="cart_id" value="">
<input type="submit" name="search_request_button" value="Search">
</font></td>
</tr>
</table>
<br>
</form>
Right now the search brings up any item that falls under any of the catagories in the fields. I would like it to ONLY find the specific fields that are requested. I'm using the open source ezwebstore script. I think this might be the line that needs to be altered:
$search_request = $form_data{'search_request_button'};
$cart_id = $form_data{'cart_id'};
Thanks in advance,
dHaRmAcHic
I'm a bit new to cgi but familiar enough to create basic forms. I've created several drop down lists for an advance search and would like the search results to contain only the precise criteria selected. Is there a particular command I could just add?
OK, here's my form to maybe make things a bit clearer:
<form action=ezwebstore.cgi method=post>
<div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Search
by Keyword:
<input type="text" name="keywords" size="16" maxlength="60" value="">
<br>
<br>
or use our Advanced Search<br>
</font></div>
<table cellspacing=2 cellpadding=2 width=400 border=0>
<tr>
<td align=left width=33%><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Jewelry
Type </font></td>
<td align=left width="33%"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Special</font></td>
<td align=left width="33%"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Stone
Shape </font></td>
</tr>
<tr>
<td align=left width="33%"> <font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<select name="category">
<option value="-----" selected>-----</option>
<option value="RINGS">RINGS</option>
<option value="BRACELETS">BRACELETS</option>
</select>
</font></td>
<td align=left width="33%"> <font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<select name="userDefinedFour">
<option value="-----" selected>-----</option>
<option value="BASIC">BASIC</option>
<option value="FASHION">FASHION</option>
<option value="HIGH LINE">HIGH LINE</option>
<option value="LIGHT WEIGHT">LIGHT WEIGHT</option>
<option value="FLAT BACK">FLAT BACK</option>
</select>
</font></td>
<td align=left width="33%"> <font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<select name="userDefinedOne">
<option value="-----" selected>-----</option>
<option value="Oval">Oval</option>
<option value="Octagon">Octagon</option>
<option value="Cush">Cush</option>
<option value="Pear">Pear</option>
<option value="Wavette">Wavette</option>
<option value="Diamond">Diamond</option>
<option value="Heart">Heart</option>
<option value="Round">Round</option>
<option value="Trillion">Trillion</option>
</select>
</font></td>
</tr>
<tr>
<td align=left width=33%><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Style
</font></td>
<td align=left width="33%"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Stone
Size </font></td>
<td align=left width=33%><font size="2" face="Verdana, Arial, Helvetica, sans-serif"> </font></td>
</tr>
<tr>
<td align=left width="33%"> <font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<select name="userDefinedFive">
<option value="-----" selected>-----</option>
<option value="STONE">STONE</option>
<option value="PEARL">PEARL</option>
<option value="ALL DIAMOND">ALL DIAMOND</option>
<option value="NO DIAMOND">NO DIAMOND</option>
</select>
</font></td>
<td align=left width="33%"> <font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<select name="name">
<option value="-----" selected>-----</option>
<option value="5x3">5x3</option>
<option value="5x4">5x4</option>
<option value="6x3">6x3</option>
<option value="6x4">6x4</option>
<option value="7x5">7x5</option>
<option value="8x4">8x4</option>
<option value="8x5">8x5</option>
<option value="8x6">8x6</option>
<option value="9x6">9x6</option>
<option value="9x7">9x7</option>
<option value="10x4">10x4</option>
<option value="10x5">10x5</option>
<option value="10x7">10x7</option>
<option value="10x8">10x8</option>
<option value="11x9">11x9</option>
<option value="12x6">12x6</option>
<option value="12x10">12x10</option>
<option value="14x10">14x10</option>
<option value="14x12">14x12</option>
<option value="16x8">16x8</option>
<option value="16x12">16x12</option>
<option value="18x9">18x9</option>
<option value="18x13">18x13</option>
<option value="4mm">4mm</option>
<option value="5mm">5mm</option>
<option value="5.5">5.5</option>
<option value="6mm">6mm</option>
<option value="7mm">7mm</option>
<option value="7.5">7.5</option>
<option value="8mm">8mm</option>
</select>
</font></td>
<td align=left width="33%"> <font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<input type="hidden" name="cart_id" value="">
<input type="submit" name="search_request_button" value="Search">
</font></td>
</tr>
</table>
<br>
</form>
Right now the search brings up any item that falls under any of the catagories in the fields. I would like it to ONLY find the specific fields that are requested. I'm using the open source ezwebstore script. I think this might be the line that needs to be altered:
$search_request = $form_data{'search_request_button'};
$cart_id = $form_data{'cart_id'};
Thanks in advance,
dHaRmAcHic