• I am having problem with the form on how I passed the search string for the users selection.

    <form role=”search” method=”get” id=”searchform” action=”<?php bloginfo(‘url’); ?>”>
    <div>
    <label class=”screen-reader-text” for=”s”>Search for:</label>

    <select name=”pros” id=”type” class=”postform”>
    <option value=”” selected=”selected”>– Search a Pros — </option>
    <option value=”pros: Accountants”>Attorney</option>
    <option value=”pros: Engineers”>Financial Pros</option>
    <option value=”pros: Doctors”>Counselors</option>
    </select>

    <select name=”gender”>
    <option value=”” selected=”selected”> — Select Gender — </option>
    <option value=”gender: male”>Male</option>
    <option value=”gender: female”>Female</option>
    </select>

    <input type=”submit” id=”searchsubmit” value=”Search” />

      <?php
      $blogusers = get_users(‘search=john’);
      foreach ($blogusers as $user) {
      echo ‘

    • ‘ . $user->user_email . ‘
    • ‘;
      }
      ?>

    </div>
    </form>

    This is what I am trying to get through.

    $blogusers = get_users(‘search=accountants&&male’);

    How to pass the search string dynamically for the users selection.

  • The topic ‘dropdown search form for registered user’ is closed to new replies.