title: Passing HTML values using GET request
body: <p>I am trying to pass a HTML form elements value into node.js file via GET request. </p>
  
  <p>How do I do it? </p>
  
  <p>I have found similar examples with POST requests but I need to use GET request alone here.
  The HTML form value is the search string I am going to use to search in database.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>app.get('/search', function (req, res){
      res.sendfile('./views/search.html');
      console.log(req.body.denomination);
      user.find({denomination: req.params.denomination}, function (err, docs) { 
          res.render('index', {users: docs});
      });
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;form action="/search" method="get"&gt;
      &lt;label for="denomination"&gt;Denomination&lt;/label&gt;&lt;br&gt;
      &lt;input type="text" name="denomination"&gt;&lt;br&gt;
      &lt;button type="button" class="btn btn-primary btn-lg" onclick="like(this)"&gt;submit&lt;/button&gt;
  &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>