I am working on Project 1 for CS50W on EdX. I am building the book search Flask app. My problem is with building the SQL SELECT statement utilizing the WHERE clause depending on the search fields.
I tried checking whether text field in form is empty, but regardless of the input Python doesn't consider the field empty.
title = request.form.get("title") if title is None: result = "Empty" else: result = "Not Empty"
Whether I input a value into title, the result I get is always "Not Empty". Is there another way to check whether the user typed anything in?