title: Flask search based on a keyword
body: <p>i'm new with flask and i'm working on a blog project , i'm trying add a search box where a visitor or an user enter a key word , and posts related to this keyword will be displayed.
  i tried the whoosh indexing but it didn't work since i'm using python3.9 so i tried this one :</p>
  <pre><code>@app.route('/search', methods =[&quot;GET&quot;, &quot;POST&quot;])
  def search():
      search_keyword = request.form.get(&quot;search_box&quot;)
      results =  db.engine.execute(&quot;SELECT * FROM post &quot;
                             &quot;WHERE title = search_box &quot;)
      return render_template('home.html', results=results)
  </code></pre>
  <p>trying to get the value of the input field</p>
  <pre><code>&lt;form class=&quot;form-inline my-2 my-lg-0&quot;&gt;
                    &lt;input class=&quot;form-control mr-sm-2&quot; type=&quot;search&quot; placeholder=&quot;Search&quot; aria-label=&quot;Search&quot; method=&quot;GET&quot; action=&quot;search&quot;  name=&quot;search_box&quot;&gt;
                    &lt;button class=&quot;btn btn-outline-success my-2 my-sm-0&quot; type=&quot;submit&quot;&gt;Search&lt;/button&gt;
                  &lt;/form&gt;
  </code></pre>
  <p>no errors but it's not working , can anyone help me please ? thanks</p>