// only execute search if the search button is clicked or there are search params in the url
if ( isset( $_REQUEST['searchButton'] ) || !empty( $_GET['alpha'] ) || !empty( $_GET['pageSelect'] ) ){
-
+
$form_data = $_POST;
// build array of potential search fields , will be used in the paging urls
}
// generate the WHERE clause string from the array of options
- implode($clause, $search_fields);
+ $search = implode($clause, $search_fields);
// check the GET variables for sql queries with paging
if( empty( $search ) && empty( $alpha_key) && empty($get_values) ){
-
+
$where = "";
} else if( !empty( $alpha_key ) ) {
$where = "last_name LIKE '$alpha_key%'";
} else if( !empty( $get_values ) ){
-
+
foreach($get_values as $key=>$value){
if($value !== ''){
// remove the last AND or OR statement from the query string
$where = substr($where, 0, -5);
- }else {
-
+ } else {
+
$where = $search;
}
<option value="100">100</option>
<option value="500">500</option>
</select>
+ {if $obits}
<table class="footable results-table" data-paging="false">
<thead>
<tr>
<th>Maiden Name</th>
</tr>
</thead>
- {if $obits}
+
{foreach from=$obits item=i}
<tr>
<td>{$i.b_yr_range}</td>
<td>{$i.maiden_other}</td>
</tr>
{/foreach}
- {else}
- <tr>
- No Results
- </tr>
-
- {/if}
</table>
+ {else}
+ <div class="no-results">No Results Found</div>
+ {/if}
</div>
</form>
</div>