Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template Name: findyardsale-search
- */
- get_header();
- global $wpdb;
- global $query_string;
- $query_args = explode("&", $query_string);
- $search_query = array();
- $search_query = $wpdb->get_results('SELECT * FROM ' . $address_table . 'WHERE address = ' . $city);
- foreach($query_args as $key => $string) {
- $query_split = explode("=", $string);
- $search_query[$query_split[0]] = urldecode($query_split[1]);
- } // foreach
- $search = new WP_Query($search_query);
- ?>
- <div class="widget artwork-seachform search" rol="search">
- <h3 class="widget-title">Search Artwork</h3>
- <form role="search" action="<?php echo site_url('/'); ?>" method="get">
- <input type="search" name="s" placeholder="Search: Enter artwork keywords hit enter"/>
- <input type="hidden" name="<?php $query = $wpdb->get_results('SELECT * FROM ' . $address_table . 'WHERE address = ' . $city); ?>" value="artworks" />
- <input type="submit" alt="Search" value="Search" />
- </form>
- </div><!-- .search -->
- <?php
- get_footer();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement