Bootstrap form, how to use with POST

后端 未结 1 1132
轻奢々
轻奢々 2020-12-18 22:58

I am working on a class project and I have a webpage to do search: http://ada.uprrp.edu/~ehazim/hpcf_proj/basicsearch.html

Here is the basic code:

&l         


        
相关标签:
1条回答
  • 2020-12-18 23:21

    Read through and follow the example at http://getbootstrap.com/css/#forms

    So, would end up being

    <form action="results.php" method="POST" role="form" class="form-horizontal">
      <div class="form-group">
        <label for="searchterm" class="col-sm-2 control-label">Choose Search Type</label>
        <select name="searchtype" class="form-control">
          <option value="ip"> IP Adress </option>
          <option value="ss_name"> Software Services </option>
          <option value="IS"> ISBN </option>
        </select>
      </div>
      <div class="form-group">
        <label for="searchterm" class="col-sm-2 control-label">Choose Search Term</label>
        <div class="col-sm-10">
          <input type="text" class="form-control" id="searchterm" name="searchterm">
        </div>
      </div>
      <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
          <button type="submit" class="btn btn-default">Search</button>
        </div>
      </div>
    </form>
    
    0 讨论(0)
提交回复
热议问题