msin147 Posted April 25, 2008 Share Posted April 25, 2008 I know I have to change the query for this to work the way I want it to. I think I have that part figured out but I am having trouble with the existing form here and assigning the values of these checkboxes into the variable for the category search. Right now in this example I am using $sIDs I have also used $cid, $cids, $sobiCid. I am wondering if maybe I cant post because I have my checkboxes in the existing get form or I am just doing something wrong. I have been testing with just one box to see if I can get a response when I search or printing to see if it is right but no luck. Will someone look at this and tell me what I am doing wrong to make the checkboxes values be the search parameter for category search. Thank you here is code: <form id="sobiSearchFormContainer" accept-charset="<?php echo $iso[1];?>" action="<?php echo $config->liveSite; ?>/<?php echo $index;?>" method="get" name="sobiSearchFormContainer"> <table class="sobi2eSearchForm"> <tr> <td><?php if( $config->key("search", "search_box", true )) { echo _SOBI2_SEARCH_FOR; } ?></td> <td> <?php if( $config->key("search", "search_box", true )) { ?> <input name="sobi2Search" id="sobi2Search" class="inputbox" value="<?php echo $String; ?>" onclick="if (this.value == '<?php echo _SOBI2_SEARCH_INPUTBOX; ?>') this.value = '';" onblur="if (this.value == '') this.value = '<?php echo _SOBI2_SEARCH_INPUTBOX; ?>';"/> <?php } ?> </td> <td> <?php if( $config->key("search", "search_box", true )) { ?> <input type="submit" id="sobiSearchSubmitBt" name="search" onmousedown="$('SobiSearchPage').value = 0" onkeydown="$('SobiSearchPage').value = 0" class="button" value="<?php echo _SOBI2_SEARCH_H; ?>"/> <?php } ?> </td> <td id="sobi2eSearchEmptyCell"> <?php if( ($f = $config->key( "search", "empty_cell_calback_function", false )) && function_exists( $f )) { $ecell = call_user_func( $f ); } else { $ecell = " "; } echo $ecell; ?> </td> </tr> <tr> <td colspan="4"> <?php if( $config->key("search", "phrase_any", true )) { ?> <input type="radio" <?php if($phrase == 'any' || $phrase != 'all' || $phrase != 'exact' ) echo "checked=\"checked\"" ?> name="searchphrase" id="searchphraseany" value="any" /> <label for="searchphraseany"><?php echo _SOBI2_SEARCH_ANY ?></label> <?php } ?> <?php if( $config->key("search", "phrase_all", true )) { ?> <input type="radio" <?php if($phrase == 'all') echo "checked=\"checked\"" ?> name="searchphrase" id="searchphraseall" value="all" /> <label for="searchphraseall"><?php echo _SOBI2_SEARCH_ALL ?></label> <?php } ?> <?php if( $config->key("search", "phrase_exact", true )) { ?> <input type="radio" <?php if($phrase == 'exact') echo "checked=\"checked\"" ?> name="searchphrase" id="searchphraseexact" value="exact" /> <label for="searchphraseexact"><?php echo _SOBI2_SEARCH_EXACT ?></label> <?php } ?> </td> </tr> <tr> <td colspan="4"> <?php if( !$config->key("search", "search_box", true )) { ?> <input type="submit" id="sobiSearchSubmitBt" name="search" onmousedown="$('SobiSearchPage').value = 0" onkeydown="$('SobiSearchPage').value = 0" class="button" value="<?php echo _SOBI2_SEARCH_H; ?>"/> <?php } ?> <?php if($config->ajaxSearchUseSlider) { ?> <input type="button" id="sobiSearchFormExtOptToggle" class="button" name="sobiSearchFormExtOptToggle" value="<?php echo _SOBI2_SEARCH_TOOGLE_EXTENDED; ?>"/> <?php } ?> <input type="button" id="sobiSearchFormReset" class="button" name="sobiSearchFormReset" title="<?php echo _SOBI2_SEARCH_RESET_FORM_TITLE;?>" value="<?php echo _SOBI2_SEARCH_RESET_FORM; ?>" onclick="resetSobi2SearchForm()"/> <br/><br/> </td> </tr> </table> <?php $sIDs = & $_POST["Search12"]; ?> <?php print_r($_POST["Search12"]); ?> <div id="sobiSearchFormExtOpt"> <table class="sobi2eSearchForm"> <div> <input type="checkbox" name="Search12[]" value="6" > Additions & Remodels    <input type="checkbox" name="Search12[]" value="21" > Appliances    <input type="checkbox" name="Search12[]" value="24" > Builders (New Homes), Architects & Designers   <br /> <input type="checkbox" name="Search12[]" value="26" > Carpentry & Cabinets    <input type="checkbox" name="Search12[]" value="27" > Cleaning Services    <input type="checkbox" name="Search12[]" value="28" > Concrete, Brick & Stone   <br /> <input type="checkbox" name="Search12[]" value="4" > Electrical, Telephone & Computers    <input type="checkbox" name="Search12[]" value="7" > Flooring    <input type="checkbox" name="Search12[]" value="3" > General Contractors   <br /> <input type="checkbox" name="Search12[]" value="10" > Handyman Services    <input type="checkbox" name="Search12[]" value="13" > Heating & Cooling    <input type="checkbox" name="Search12[]" value="16" > Home Construction   <br /> <input type="checkbox" name="Search12[]" value="9" > Home Exterior    <input type="checkbox" name="Search12[]" value="25" > Home Theater    <input type="checkbox" name="Search12[]" value="18" > Interior Living   <br /> <input type="checkbox" name="Search12[]" value="12" > Kitchens and Baths    <input type="checkbox" name="Search12[]" value="19" > Landscape, Decks & Fences    <input type="checkbox" name="Search12[]" value="22" > Moving & Storage   <br /> <input type="checkbox" name="Search12[]" value="23" > Other Services    <input type="checkbox" name="Search12[]" value="5" > Painting & Staining    <input type="checkbox" name="Search12[]" value="8" > Plumbing   <br /> <input type="checkbox" name="Search12[]" value="11" > Pools, Spas, Hot Tubs & Saunas    <input type="checkbox" name="Search12[]" value="14" > Roofing, Siding & Gutters    <input type="checkbox" name="Search12[]" value="17" > Walls & Ceilings   <br /> <input type="checkbox" name="Search12[]" value="20" > Windows & Doors    <input type="checkbox" name="Search12[]" value="15" > Yard & Garden    </div> <?php if(!$config->ajaxSearchCatsForFields) { if(count($dropListsArray)) { foreach($dropListsArray as $label => $dropList) { echo "<tr><td>{$label}</td><td colspan='2'>{$dropList}</td></tr>"; } } } ?> <?php if( $config->key("search", "cats", true )) { ?> <tr> <td style="vertical-align:top;"><?php echo _SOBI2_SEARCH_TOOGLE_CATS; ?></td> <td colspan='2'> <?php if($config->ajaxSearchUseSlider) { ?> <div id="sobiSearchFormCatsSelection" <?php if($config->ajaxSearchUseSlider) { ?> style="height:<?php echo $config->ajaxSearchCatsContHeight;?>px;" <?php } ?>> <?php } ?> <?php echo sobiAxSearch::axSearchCatChooser( $selectedCats, $cid ); ?> <?php if($config->ajaxSearchUseSlider) { ?> </div> <?php } ?> </td> </tr> <?php } ?> <?php if($config->ajaxSearchCatsForFields) { if(count($dropListsArray)) { foreach($dropListsArray as $label => $dropList) { echo "<tr><td>{$label}</td><td colspan='2'>{$dropList}</td></tr>"; } } } ?> </table> </div> <input type="hidden" name="option" value="com_sobi2"/> <input type="hidden" name="no_html" value="1"/> <input type="hidden" name="sobi2Task" value="axSearch"/> <input type="hidden" name="sobiCid" id="sobiCid" value="<?php echo $cid; ?>"/> <input type="hidden" id="SobiSearchPage" name="SobiSearchPage" value="<?php echo $page;?>"/> </form> Link to comment https://forums.phpfreaks.com/topic/102914-question-about-posting-a-value-in-form/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.