How to pass the select value?
-
Currently creating a custom search form where wordpress members able to search for registered users based in their professions.
Below is my code:
<form method=”get” id=”searchform” action=”<?php echo esc_url( home_url( ‘/’ ) ); ?>”>
<label for=”s” class=”assistive-text”><?php _e( ‘Search’, ‘twentyeleven’ ); ?></label><select name=”s” id=”s” class=”field”>
<option value=”” selected=”selected”>– Search a Pros — </option>
<option value=”s: doctor”>Doctor</option>
<option value=”s: psychologist”>Psychologist</option>
<option value=”s: Dentist”>Dentist</option>
</select>
<input type=”submit” class=”submit” name=”submit” id=”searchsubmit” value=”<?php esc_attr_e( ‘Search’, ‘twentyeleven’ ); ?>” />
</form>When I search I get no results which I believe there is something here that I am missing. Some guys told me a query to mysql table will do the work. Can you point me what to do here?
Thanks.
- The topic ‘How to pass the select value?’ is closed to new replies.