A good way to test this is to look at the generated debug SOQL at the bottom of the page and then run it in SOQL Xplorer or something. This will give you a good indication what is going on under the hood. For instance, when I entered 60 into the Amount field, the generated SOQL is:
select name, accountid, amount, closedate, forecastcategoryname, ownerid from opportunity where accountid != null and amount LIKE '60%' order by closedate desc limit 25
Since amount is a numeric field, and amount LIKE '60%' order is not going to work. You are constructing the SOQL as string values when some are numeric and dates. For instance, your amount section:
if (!amount.equals(''))
soql += ' and amount LIKE \''+String.escapeSingleQuotes(amount)+'%\'';
Should look something like:
if (!amount.equals(''))
soql += ' and amount > '+amount+''';
This is likely not gonna go far.
A search bar is basically a form, you just don't store any data.
The first problem you will face with both your question is:
you'll need some client side script to capture the user's form input from the search field once he clicks the search button, to create a search URL with parameters, or something similar.
On a webpage, you'd do this with something like an on-click javascript function. As this function should process input by the client, this is by necessity client-side script, and cannot be performed on server-side using SSJS or AMPScript (the server is out of the picture once the email leaves the system), which would be before the user has a chance for making any inputs.
Here's the catch: Client-side script is blocked or stripped by pretty much any email recipient system, for good reason (bad actors could use this as well as legitimate ones).
In general, forms in emails aren't exactly a match made in heaven - I'll stop short of saying they don't work, because there are some very, very limited applications like "interactive email" that turn into basic webpage fallbacks outside of some supported clients.
you can google "forms in emails" and you will find a lot of red flags, even if you get it to work somehow.
https://help.salesforce.com/s/articleView?id=sf.pardot_forms_in_email.htm&type=5
https://litmus.com/community/discussions/4880-use-of-forms-in-emails
https://litmus.com/community/discussions/484-embedded-form-within-an-email
Best Answer
I don't think you can do it. You can add buttons to search results page but for the button to appear there has to be at least 1 record found.
The button type would have to be "list view button" and you add it by modifying for example Accounts -> Account Search Layouts -> Search Results.
This would lead to somehow stupid work process of "can't find it or it doesn't find what you want? Good, type something you know that exists just so the button shows up..."
Out of the box there are few options:
You could also build your own "search before create" page I guess - either a real full page or something tiny, suitable to be added as Global Chatter action. You could then call this action from Chatter homepage.
(Delivery is a custom object from Salesforce1 workshop guides)